QWebEngineLoadingInfo Class

A utility type for the WebEngineView::loadingChanged signal. More...

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

Public Types

enum ErrorDomain { NoErrorDomain, InternalErrorDomain, ConnectionErrorDomain, CertificateErrorDomain, HttpErrorDomain, …, HttpStatusCodeDomain }
enum LoadStatus { LoadStartedStatus, LoadStoppedStatus, LoadSucceededStatus, LoadFailedStatus }


Public Functions

QWebEngineLoadingInfo(QWebEngineLoadingInfo &&other)
QWebEngineLoadingInfo(const QWebEngineLoadingInfo &other)
QWebEngineLoadingInfo &operator=(QWebEngineLoadingInfo &&other)
QWebEngineLoadingInfo &operator=(const QWebEngineLoadingInfo &other)
int errorCode() const
QWebEngineLoadingInfo::ErrorDomain errorDomain() const
QString errorString() const
bool isErrorPage() const
QWebEngineLoadingInfo::LoadStatus status() const
QUrl url() const

Detailed Description

Contains information about a web page loading status change, such as the URL and current loading status (started, succeeded, stopped, failed).

See also QWebEnginePage::loadStarted, QWebEnginePage::loadFinished, and WebEngineView::loadingChanged.

Member Type Documentation

enum QWebEngineLoadingInfo::ErrorDomain

This enumeration holds the type of a load error:

QWebEngineLoadingInfo::NoErrorDomain0Error type is not known.
QWebEngineLoadingInfo::InternalErrorDomain1Content cannot be interpreted by Qt WebEngine.
QWebEngineLoadingInfo::ConnectionErrorDomain2Error results from a faulty network connection.
QWebEngineLoadingInfo::CertificateErrorDomain3Error is related to the SSL/TLS certificate.
QWebEngineLoadingInfo::HttpErrorDomain4Error is related to the HTTP connection.
QWebEngineLoadingInfo::FtpErrorDomain5Error is related to the FTP connection.
QWebEngineLoadingInfo::DnsErrorDomain6Error is related to the DNS connection.
QWebEngineLoadingInfo::HttpStatusCodeDomain7Error is the HTTP response status code, even in case of success e.g. the server replied with status 200.

enum QWebEngineLoadingInfo::LoadStatus

This enumeration represents the load status of a web page load request:

QWebEngineLoadingInfo::LoadStartedStatus0Page is currently loading.
QWebEngineLoadingInfo::LoadStoppedStatus1Loading the page was stopped by the stop() method or by the loader code or network stack in Chromium.
QWebEngineLoadingInfo::LoadSucceededStatus2Page has been loaded with success.
QWebEngineLoadingInfo::LoadFailedStatus3Page could not be loaded.

Property Documentation

[read-only] errorCode : const int

Holds the error code.

Access functions:

int errorCode() const

[read-only] errorDomain : const ErrorDomain

Access functions:

QWebEngineLoadingInfo::ErrorDomain errorDomain() const

[read-only] errorString : const QString

Holds the error message.

Access functions:

QString errorString() const

[read-only] isErrorPage : const bool

Indicates if the load resulted in an error page.

Access functions:

bool isErrorPage() const

[read-only] status : const LoadStatus

This property holds the load status of the page.

Access functions:

QWebEngineLoadingInfo::LoadStatus status() const

[read-only] url : const QUrl

Holds the URL of the load request.

Access functions:

QUrl url() const

Member Function Documentation

QWebEngineLoadingInfo::QWebEngineLoadingInfo(QWebEngineLoadingInfo &&other)

Move-copy constructor.

QWebEngineLoadingInfo::QWebEngineLoadingInfo(const QWebEngineLoadingInfo &other)

Default constructs an instance of QWebEngineLoadingInfo.

QWebEngineLoadingInfo &QWebEngineLoadingInfo::operator=(QWebEngineLoadingInfo &&other)

Move-assignment operator.

QWebEngineLoadingInfo &QWebEngineLoadingInfo::operator=(const QWebEngineLoadingInfo &other)

Copy-assignment operator.


Destroys the instance of QWebEngineLoadingInfo.

QUrl QWebEngineLoadingInfo::url() const

Returns the URL of the load request.

Note: Getter function for property url.

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