QWebViewLoadingInfo Class
该类提供QWebView::loadingChanged() 信号的加载状态信息。更多
| Header: | #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
公共功能
| 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 。
成员函数文档
[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.