QWebEngineNewWindowRequest Class

A utility type for the QWebEnginePage::newWindowRequested () 信号。 更多...

头: #include <QWebEngineNewWindowRequest>
CMake: find_package(Qt6 COMPONENTS WebEngineCore REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.2
实例化: WebEngineNewWindowRequest
继承: QObject

公共类型

enum DestinationType { InNewWindow, InNewTab, InNewDialog, InNewBackgroundTab }

特性

公共函数

QWebEngineNewWindowRequest::DestinationType destination () const
bool isUserInitiated () const
void openIn (QWebEnginePage * page )
QRect requestedGeometry () const
QUrl requestedUrl () const

详细描述

Contains information about a request to load a page in a separate web engine view.

另请参阅 QWebEnginePage::newWindowRequested ().

成员类型文档编制

enum QWebEngineNewWindowRequest:: DestinationType

This enum describes the type of window requested:

常量 描述
QWebEngineNewWindowRequest::InNewWindow 0 In a separate window.
QWebEngineNewWindowRequest::InNewTab 1 In a tab of the same window.
QWebEngineNewWindowRequest::InNewDialog 2 In a window without a tab bar, toolbar, or URL bar.
QWebEngineNewWindowRequest::InNewBackgroundTab 3 In a tab of the same window, without hiding the currently visible web engine view.

特性文档编制

[read-only] destination : const DestinationType

This property holds the type of window that is requested.

访问函数:

QWebEngineNewWindowRequest::DestinationType destination () const

[read-only] requestedGeometry : const QRect

This property holds the size that is requested for the new page.

访问函数:

QRect requestedGeometry () const

[read-only] requestedUrl : const QUrl

This property holds the URL that is requested for the new page.

访问函数:

QUrl requestedUrl () const

[read-only] userInitiated : const bool

Whether this page request was directly triggered as the result of a keyboard or mouse event.

You can use this property to block automatic popups .

访问函数:

bool isUserInitiated () const

成员函数文档编制

void QWebEngineNewWindowRequest:: openIn ( QWebEnginePage * page )

Opens the requested window in the view represented by page .

另请参阅 QWebEnginePage::newWindowRequested .