QWebViewLoadingInfo Class
该类为QWebView::loadingChanged()信号提供负载状态信息。更多内容...
| 头文件: | #include <QWebViewLoadingInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WebView) target_link_libraries(mytarget PRIVATE Qt6::WebView) |
| qmake: | QT += webview |
| 自: | Qt 6.11 |
公共类型
| enum class | LoadStatus { Started, Succeeded, Failed, Stopped } |
属性
- errorString : const QString
- status : const LoadStatus
- url : const QUrl
公共函数
| QWebViewLoadingInfo(QWebViewLoadingInfo &&other) | |
| QString | errorString() const |
| QWebViewLoadingInfo::LoadStatus | status() const |
| void | swap(QWebViewLoadingInfo &other) |
| QUrl | url() const |
成员类型文档
enum class QWebViewLoadingInfo::LoadStatus
此枚举表示网页加载请求的加载状态。
| 常量 | 值 | 描述 |
|---|---|---|
QWebViewLoadingInfo::LoadStatus::Started | 0 | 页面正在加载。 |
QWebViewLoadingInfo::LoadStatus::Succeeded | 2 | 页面已成功加载。 |
QWebViewLoadingInfo::LoadStatus::Failed | 3 | 无法加载该页面。 |
QWebViewLoadingInfo::LoadStatus::Stopped | 1 | 页面加载已被停止。 |
另请参阅 QWebView::loadingChanged()。
属性文档
[read-only] errorString : const QString
存储错误消息。
在加载请求失败时,用于存储错误消息。
访问函数:
| QString | errorString() const |
另请参阅 QWebView::loadingChanged()。
[read-only] status : const LoadStatus
该属性保存网页加载请求的状态。
此枚举表示网页加载请求的加载状态。
访问函数:
| QWebViewLoadingInfo::LoadStatus | status() const |
另请参阅 QWebView::loadingChanged()。
[read-only] url : const QUrl
该属性存储加载请求的 URL。加载请求的 URL。
访问函数:
| QUrl | url() const |
另请参阅 QWebView::url 。
成员函数文档
[constexpr noexcept default] QWebViewLoadingInfo::QWebViewLoadingInfo(QWebViewLoadingInfo &&other)
通过Move操作构造一个QWebViewLoadingInfo 的实例。
[noexcept] void QWebViewLoadingInfo::swap(QWebViewLoadingInfo &other)
将此加载信息与other 互换。此操作速度极快,且绝不会失败。
© 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.