QWebEngineNewWindowRequest Class
QWebEnginePage::newWindowRequested() 信号的实用程序类型。更多
头文件: | #include <QWebEngineNewWindowRequest> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
自 | Qt 6.2 |
在 QML 中: | WebEngineNewWindowRequest |
继承: | QObject |
公共类型
enum | DestinationType { InNewWindow, InNewTab, InNewDialog, InNewBackgroundTab } |
属性
- destination : const DestinationType
- requestedGeometry : const QRect
- requestedUrl : const QUrl
- userInitiated : const bool
公共功能
QWebEngineNewWindowRequest::DestinationType | destination() const |
bool | isUserInitiated() const |
void | openIn(QWebEnginePage *page) |
QRect | requestedGeometry() const |
QUrl | requestedUrl() const |
另请参阅 QWebEnginePage::newWindowRequested().
成员类型文档
enum QWebEngineNewWindowRequest::DestinationType
该枚举描述了所请求的窗口类型:
常量 | 值 | 描述 |
---|---|---|
QWebEngineNewWindowRequest::InNewWindow | 0 | 在单独窗口中。 |
QWebEngineNewWindowRequest::InNewTab | 1 | 在同一窗口的标签页中。 |
QWebEngineNewWindowRequest::InNewDialog | 2 | 在没有标签栏、工具栏或 URL 栏的窗口中。 |
QWebEngineNewWindowRequest::InNewBackgroundTab | 3 | 在同一窗口的标签页中,不隐藏当前可见的网络引擎视图。 |
属性文档
[read-only]
destination : const DestinationType
该属性用于保存所请求的窗口类型。
访问功能:
QWebEngineNewWindowRequest::DestinationType | destination() const |
[read-only]
requestedGeometry : const QRect
该属性用于保存为新页面申请的大小。
访问功能:
QRect | requestedGeometry() const |
[read-only]
requestedUrl : const QUrl
该属性包含为新页面请求的 URL。
访问功能:
QUrl | requestedUrl() const |
[read-only]
userInitiated : const bool
该页面请求是否由键盘或鼠标事件直接触发。
您可以使用此属性阻止自动弹出。
访问函数:
bool | isUserInitiated() const |
© 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.