QWebEngineLoadingInfo Class

A utility type for the WebEngineView::loadingChanged 信号。 更多...

头: #include <QWebEngineLoadingInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake: QT += webenginecore
Since: Qt 6.2
实例化: WebEngineLoadingInfo

公共类型

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

特性

公共函数

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

详细描述

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

另请参阅 QWebEnginePage::loadStarted , QWebEnginePage::loadFinished ,和 WebEngineView::loadingChanged .

成员类型文档编制

enum QWebEngineLoadingInfo:: ErrorDomain

This enumeration holds the type of a load error:

常量 描述
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:

常量 描述
QWebEngineLoadingInfo::LoadStartedStatus 0 目前正在加载页面。
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.

特性文档编制

[read-only] errorCode : const int

Holds the error code.

访问函数:

int errorCode () const

[read-only] errorString : const QString

Holds the error message.

访问函数:

QString errorString () const

[read-only] isErrorPage : const bool

Indicates if the load resulted in an error page.

访问函数:

bool isErrorPage () const

[read-only] status : const LoadStatus

This property holds the load status of the page.

访问函数:

QWebEngineLoadingInfo::LoadStatus status () const

[read-only] url : const QUrl

Holds the URL of the load request.

访问函数:

QUrl url () const

成员函数文档编制

QUrl QWebEngineLoadingInfo:: url () const

Returns the URL of the load request.

注意: Getter function for property url.