WebEngineNavigationRequest QML Type

代表导航到网页的请求,是WebEngineView::navigationRequested() 的一部分。更多

Import Statement: import QtWebEngine
Since: QtWebEngine 1.0
In C++: QWebEngineNavigationRequest

属性

详细说明

要接受或拒绝一个请求,请调用 accept() 或 reject()。

属性文档

action : enumeration

接受或忽略导航请求。

常数说明
WebEngineNavigationRequest.AcceptRequest接受导航请求。
WebEngineNavigationRequest.IgnoreRequest忽略导航请求。

hasFormData : bool [read-only, since 6.8]

导航请求是否包含表单数据

此属性在 Qt 6.8 中引入。


isMainFrame : bool [read-only]

导航问题是否为顶级页面请求。


用于导航到网页的方法。

常量说明
WebEngineNavigationRequest.LinkClickedNavigation点击链接
WebEngineNavigationRequest.TypedNavigation在地址栏中输入 URL。
WebEngineNavigationRequest.FormSubmittedNavigation提交表单
WebEngineNavigationRequest.BackForwardNavigation使用导航历史记录进入上一页或下一页。
WebEngineNavigationRequest.ReloadNavigation重新载入页面。
WebEngineNavigationRequest.RedirectNavigation页面内容或服务器触发了重定向或页面刷新。
WebEngineNavigationRequest.OtherNavigation使用其他方法进入页面。

url : url [read-only]

要转到的网页的 URL。


© 2025 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.