WebViewSettings QML Type

允许配置浏览器属性和属性。更多

Import Statement: import QtWebView
Since: QtWebView 6.5

属性

详细说明

WebViewSettings 类型可用于配置浏览器属性和通用属性,如 JavaScript 支持、文件访问和本地存储功能。该类型不可创建,但可通过WebView.settings 属性访问所有 Web 视图的默认设置。

默认值由不同平台设置。

属性文件

allowFileAccess : bool

使WebView 能够加载文件 URL。


javaScriptEnabled : bool

允许运行 JavaScript 程序。


localContentCanAccessFileUrls : bool

允许本地加载的文件访问其他本地 URL。


localStorageEnabled : bool

支持 HTML 5 本地存储功能。


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