QWebEngineNavigationRequest Class

A utility type for the QWebEnginePage::navigationRequested 信号。 更多...

头: #include <QWebEngineNavigationRequest>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.2
在 QML: WebEngineNavigationRequest
继承: QObject

特性

公共函数

void accept ()
bool hasFormData () const
bool isMainFrame () const
QWebEngineNavigationRequest::NavigationType navigationType () const
void reject ()
QUrl url () const

信号

void actionChanged ()

详细描述

Contains information about a navigation request.

To accept or reject a request, call accept () 或 reject ().

The default if not handled is to accept the navigation.

另请参阅 QWebEnginePage::navigationRequested .

特性文档编制

[read-only, since 6.8] hasFormData : const bool

This property holds whether the navigation request contains form data

该特性在 Qt 6.8 引入。

访问函数:

bool hasFormData () const

[read-only] isMainFrame : const bool

This property holds whether the navigation issue is requested for a top level page.

访问函数:

bool isMainFrame () const

This property holds the method used to navigate to a web page.

访问函数:

QWebEngineNavigationRequest::NavigationType navigationType () const

[read-only] url : const QUrl

This property holds the URL of the web page to go to.

访问函数:

QUrl url () const

成员函数文档编制

[invokable] void QWebEngineNavigationRequest:: accept ()

Accepts a navigation request.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .

[invokable] void QWebEngineNavigationRequest:: reject ()

Rejects a navigation request.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .