QWebEngineRegisterProtocolHandlerRequest Class
QWebEngineRegisterProtocolHandlerRequest 类可接受或拒绝来自registerProtocolHandlerAPI 的请求。更多
| Header: | #include <QWebEngineRegisterProtocolHandlerRequest> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
| qmake: | QT += webenginecore |
| 在 QML 中: | 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
该属性包含协议处理程序的 URL 模板。
这是registerProtocolHandler调用的第二个参数。
访问函数:
| QUrl | origin() const |
[read-only] scheme : const QString
该属性包含协议处理程序的 URL 方案。
这是registerProtocolHandler调用的第一个参数。
访问函数:
| QString | scheme() const |
成员函数文档
[invokable] void QWebEngineRegisterProtocolHandlerRequest::accept()
接受请求
对 accept() 和reject() 的后续调用将被忽略。
注: 可通过元对象系统和 QML 调用该函数。请参阅Q_INVOKABLE 。
[invokable] void QWebEngineRegisterProtocolHandlerRequest::reject()
拒绝请求。
对accept() 和 reject() 的后续调用将被忽略。
注: 可通过元对象系统和 QML 调用该函数。请参阅Q_INVOKABLE 。
bool QWebEngineRegisterProtocolHandlerRequest::operator!=(const QWebEngineRegisterProtocolHandlerRequest &that) const
如果that 指向与此请求不同的对象,则返回true 。
bool QWebEngineRegisterProtocolHandlerRequest::operator==(const QWebEngineRegisterProtocolHandlerRequest &that) const
如果that 指向与此请求相同的对象,则返回true 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.