QWebEngineNavigationRequest Class

A utility type for the QWebEnginePage::navigationRequested signal. More...

Header: #include <QWebEngineNavigationRequest>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.2
Instantiated By: WebEngineNavigationRequest
Inherits: QObject

Public Types

enum NavigationRequestAction { AcceptRequest, IgnoreRequest }
enum NavigationType { LinkClickedNavigation, TypedNavigation, FormSubmittedNavigation, BackForwardNavigation, ReloadNavigation, …, RedirectNavigation }


Public Functions

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


void actionChanged()

Detailed Description

Contains information about a navigation request.

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

The default if not handled is to accept the navigation.

See also QWebEnginePage::navigationRequested.

Member Type Documentation

Property Documentation

action : const NavigationRequestAction

Notifier signal:

void actionChanged()

[read-only] isMainFrame : const bool

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

Access functions:

bool isMainFrame() const

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

Access functions:

QWebEngineNavigationRequest::NavigationType navigationType() const

[read-only] url : const QUrl

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

Access functions:

QUrl url() const

Member Function Documentation

[virtual] QWebEngineNavigationRequest::~QWebEngineNavigationRequest()

Destroys the instance of QWebEngineNavigationRequest. The destructor is virtual.

[invokable] void QWebEngineNavigationRequest::accept()

Accepts a navigation request.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[invokable] void QWebEngineNavigationRequest::reject()

Rejects a navigation request.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

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