- Qt 6.11
- Qt WebEngine
- C++ Classes
- QtWebEngineCore
- QWebEngineLoadingInfo
- Qt 6.11.1 Reference Documentation

# 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
In QML: | webEngineLoadingInfo

- List of all members, including inherited members

## Public Types

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

## Properties

errorCode : const int errorDomain : const ErrorDomain errorString : const QString `(since 6.9)` isDownload : const bool | isErrorPage : const bool `(since 6.6)` responseHeaders : const QMultiMap<QByteArray,QByteArray> status : const LoadStatus url : const QUrl

## Public Functions

int | errorCode() const
QWebEngineLoadingInfo::ErrorDomain | errorDomain() const
QString | errorString() const
bool | isDownload() const
bool | isErrorPage() const
QMultiMap<QByteArray, QByteArray> | responseHeaders() 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:

Constant | Value | Description
--- | --- | ---
`QWebEngineLoadingInfo::NoErrorDomain` | `0` | Error type is not known.
`QWebEngineLoadingInfo::InternalErrorDomain` | `1` | Content cannot be interpreted by Qt WebEngine.
`QWebEngineLoadingInfo::ConnectionErrorDomain` | `2` | Error results from a faulty network connection.
`QWebEngineLoadingInfo::CertificateErrorDomain` | `3` | Error is related to the SSL/TLS certificate.
`QWebEngineLoadingInfo::HttpErrorDomain` | `4` | Error is related to the HTTP connection.
`QWebEngineLoadingInfo::FtpErrorDomain` | `5` | Error is related to the FTP connection.
`QWebEngineLoadingInfo::DnsErrorDomain` | `6` | Error is related to the DNS connection.
`QWebEngineLoadingInfo::HttpStatusCodeDomain` | `7` | Error 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:

Constant | Value | Description
--- | --- | ---
`QWebEngineLoadingInfo::LoadStartedStatus` | `0` | Page is currently loading.
`QWebEngineLoadingInfo::LoadStoppedStatus` | `1` | Loading the page was stopped by the stop() method or by the loader code or network stack in Chromium.
`QWebEngineLoadingInfo::LoadSucceededStatus` | `2` | Page has been loaded with success.
`QWebEngineLoadingInfo::LoadFailedStatus` | `3` | Page 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

Holds the error domain.

Access functions:

QWebEngineLoadingInfo::ErrorDomain | errorDomain() const

### `[read-only]` errorString : const QString

Holds the error message.

Access functions:

QString | errorString() const

### `[read-only, since 6.9]` isDownload : const bool

Indicates if the page load was internally stopped (`QWebEngineLoadingInfo::status()` is equal to `QWebEngineLoadingInfo::LoadStoppedStatus`) and will be continued as a download request.

This property was introduced in Qt 6.9.

Access functions:

bool | isDownload() const

### `[read-only]` isErrorPage : const bool

Indicates if the load resulted in an error page.

Access functions:

bool | isErrorPage() const

### `[read-only, since 6.6]` responseHeaders : const QMultiMap<QByteArray,QByteArray>

Holds the response headers when `QWebEngineLoadingInfo::status()` is equal to `QWebEngineLoadingInfo::LoadSucceededStatus` or `QWebEngineLoadingInfo::LoadFailedStatus`.

This property was introduced in Qt 6.6.

Access functions:

QMultiMap<QByteArray, QByteArray> | responseHeaders() 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

### QUrl QWebEngineLoadingInfo::url() const

Returns the URL of the load request.

Note: Getter function for property url.