QWebEngineRegisterProtocolHandlerRequest 类

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 .

bool QWebEngineRegisterProtocolHandlerRequest:: operator!= (const QWebEngineRegisterProtocolHandlerRequest & that ) const

返回 true if that 指向与此请求不同的对象。

bool QWebEngineRegisterProtocolHandlerRequest:: operator== (const QWebEngineRegisterProtocolHandlerRequest & that ) const

返回 true if that points to the same object as this request.