QWebEngineLoadingInfo Class
Un type d'utilitaire pour le signal WebEngineView::loadingChanged. Plus d'informations...
| En-tête : | #include <QWebEngineLoadingInfo> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
| qmake : | QT += webenginecore |
| Depuis : | Qt 6.2 |
| En QML : | webEngineLoadingInfo |
Types publics
| enum | ErrorDomain { NoErrorDomain, InternalErrorDomain, ConnectionErrorDomain, CertificateErrorDomain, HttpErrorDomain, …, HttpStatusCodeDomain } |
| enum | LoadStatus { LoadStartedStatus, LoadStoppedStatus, LoadSucceededStatus, LoadFailedStatus } |
Propriétés
|
|
Fonctions publiques
| 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 |
Description détaillée
Contient des informations sur le changement d'état de chargement d'une page web, telles que l'URL et l'état de chargement actuel (démarré, réussi, arrêté, échoué).
Voir également QWebEnginePage::loadStarted, QWebEnginePage::loadFinished, et WebEngineView::loadingChanged.
Type de membre Documentation
enum QWebEngineLoadingInfo::ErrorDomain
Cette énumération indique le type d'erreur de chargement :
| Constante | Valeur | Description de l'erreur |
|---|---|---|
QWebEngineLoadingInfo::NoErrorDomain | 0 | Le type d'erreur n'est pas connu. |
QWebEngineLoadingInfo::InternalErrorDomain | 1 | Le contenu ne peut pas être interprété par Qt WebEngine. |
QWebEngineLoadingInfo::ConnectionErrorDomain | 2 | L'erreur résulte d'une connexion réseau défectueuse. |
QWebEngineLoadingInfo::CertificateErrorDomain | 3 | L'erreur est liée au certificat SSL/TLS. |
QWebEngineLoadingInfo::HttpErrorDomain | 4 | L'erreur est liée à la connexion HTTP. |
QWebEngineLoadingInfo::FtpErrorDomain | 5 | L'erreur est liée à la connexion FTP. |
QWebEngineLoadingInfo::DnsErrorDomain | 6 | L'erreur est liée à la connexion DNS. |
QWebEngineLoadingInfo::HttpStatusCodeDomain | 7 | L'erreur est le code d'état de la réponse HTTP, même en cas de succès, par exemple si le serveur a répondu avec l'état 200. |
enum QWebEngineLoadingInfo::LoadStatus
Cette énumération représente l'état de chargement d'une page web :
| Constante | Valeur | Description |
|---|---|---|
QWebEngineLoadingInfo::LoadStartedStatus | 0 | La page est en cours de chargement. |
QWebEngineLoadingInfo::LoadStoppedStatus | 1 | Le chargement de la page a été arrêté par la méthode stop() ou par le code du chargeur ou la pile réseau dans Chromium. |
QWebEngineLoadingInfo::LoadSucceededStatus | 2 | La page a été chargée avec succès. |
QWebEngineLoadingInfo::LoadFailedStatus | 3 | La page n'a pas pu être chargée. |
Documentation sur les propriétés
[read-only] errorCode : const int
Contient le code d'erreur.
Fonctions d'accès :
| int | errorCode() const |
[read-only] errorDomain : const ErrorDomain
Contient le domaine d'erreur.
Fonctions d'accès :
| QWebEngineLoadingInfo::ErrorDomain | errorDomain() const |
[read-only] errorString : const QString
Contient le message d'erreur.
Fonctions d'accès :
| QString | errorString() const |
[read-only, since 6.9] isDownload : const bool
Indique si le chargement de la page a été interrompu en interne (QWebEngineLoadingInfo::status() est égal à QWebEngineLoadingInfo::LoadStoppedStatus) et sera poursuivi en tant que demande de téléchargement.
Cette propriété a été introduite dans Qt 6.9.
Fonctions d'accès :
| bool | isDownload() const |
[read-only] isErrorPage : const bool
Indique si le chargement a abouti à une page d'erreur.
Fonctions d'accès :
| bool | isErrorPage() const |
[read-only, since 6.6] responseHeaders : const QMultiMap<QByteArray,QByteArray>
Retient les en-têtes de la réponse lorsque QWebEngineLoadingInfo::status() est égal à QWebEngineLoadingInfo::LoadSucceededStatus ou QWebEngineLoadingInfo::LoadFailedStatus.
Cette propriété a été introduite dans Qt 6.6.
Fonctions d'accès :
| QMultiMap<QByteArray, QByteArray> | responseHeaders() const |
[read-only] status : const LoadStatus
Cette propriété indique l'état de chargement de la page.
Fonctions d'accès :
| QWebEngineLoadingInfo::LoadStatus | status() const |
[read-only] url : const QUrl
Contient l'URL de la demande de chargement.
Fonctions d'accès :
| QUrl | url() const |
Documentation des fonctions membres
QUrl QWebEngineLoadingInfo::url() const
Renvoie l'URL de la demande de chargement.
Remarque : fonction Getter pour la propriété url.
© 2026 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.