QWebEngineRegisterProtocolHandlerRequest 类使能够接受或拒绝请求,来自 registerProtocolHandler API. 更多...
头: | #include <QWebEngineRegisterProtocolHandlerRequest> |
CMake: |
find_package(Qt6 COMPONENTS WebEngineCore REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
Since: | Qt 5.11 |
实例化: | RegisterProtocolHandlerRequest |
void | accept () |
QUrl | origin () const |
void | reject () |
QString | scheme () const |
bool | operator!= (const QWebEngineRegisterProtocolHandlerRequest & that ) const |
bool | operator== (const QWebEngineRegisterProtocolHandlerRequest & that ) const |
另请参阅 QWebEnginePage::registerProtocolHandlerRequested ().
[read-only]
origin
: const
QUrl
This property holds the URL template for the protocol handler.
This is the second parameter from the registerProtocolHandler 调用。
访问函数:
QUrl | origin () const |
[read-only]
scheme
: const
QString
This property holds the URL scheme for the protocol handler.
This is the first parameter from the registerProtocolHandler 调用。
访问函数:
QString | scheme () const |
[invokable]
void
QWebEngineRegisterProtocolHandlerRequest::
accept
()
Accepts the request
Subsequent calls to accept() and reject () 被忽略。
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
[invokable]
void
QWebEngineRegisterProtocolHandlerRequest::
reject
()
Rejects the request.
Subsequent calls to accept () and reject() are ignored.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
返回
true
if
that
指向与此请求不同的对象。
返回
true
if
that
points to the same object as this request.