WebEngineNewWindowRequest QML Type

WebEngineView::newWindowRequested 信号的实用程序类型。更多

Import Statement: import QtWebEngine
Since: QtWebEngine 1.12
In C++: QWebEngineNewWindowRequest

属性

方法

详细说明

包含在独立网络引擎视图中加载页面的请求信息。

另请参阅 WebEngineView::newWindowRequested

属性文档

DestinationType : enumeration

描述如何打开新视图:

常量说明
WebEngineNewWindowRequest.InNewWindow在单独窗口中。
WebEngineNewWindowRequest.InNewTab在同一窗口的标签页中。
WebEngineNewWindowRequest.InNewDialog在没有标签栏、工具栏或 URL 栏的窗口中。
WebEngineNewWindowRequest.InNewBackgroundTab在同一窗口的标签页中,不隐藏当前可见的网络引擎视图。

destination : WebEngineNewWindowRequest::DestinationType [read-only]

要求的窗口类型。


requestedGeometry : rect [read-only, since QtWebEngine 2.0]

请求新页面的大小。

该属性在 QtWebEngine 2.0 中引入。


requestedUrl : url [read-only, since QtWebEngine 1.5]

为新页面请求的 URL。

该属性在 QtWebEngine 1.5 中引入。


userInitiated : bool [read-only]

该窗口请求是否由键盘或鼠标事件直接触发。

您可以使用该属性来阻止自动弹出窗口


方法文档

openIn(WebEngineView view)

在新的网络引擎视图view 中打开请求的页面。视图和可能加载的页面的状态和历史记录将丢失。

另请参阅 WebEngineView::newWindowRequested


© 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.