A utility type for the QWebEnginePage::navigationRequested 信号。 更多...
| 头: | #include <QWebEngineNavigationRequest> |
| CMake: |
find_package(Qt6 COMPONENTS WebEngineCore REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
| qmake: | QT += webenginecore |
| Since: | Qt 6.2 |
| 实例化: | WebEngineNavigationRequest |
| 继承: | QObject |
| void | accept () |
| 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]
isMainFrame
: const
bool
This property holds whether the navigation issue is requested for a top level page.
访问函数:
| bool | isMainFrame () const |
[read-only]
navigationType
: const
NavigationType
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 .