显示 Web 内容的组件。 更多...
|导入语句：||import QtWebView 1.1|
WebView is a component for displaying web content which is implemented using native APIs on the platforms where this is available, thus it does not necessarily require including a full web browser stack as part of the application.
注意： Due to platform limitations overlapping the WebView and other QML components is not supported.
[read-only] canGoBack : bool
if it's currently possible to navigate back in the web history.
[read-only] canGoForward : bool
if it's currently possible to navigate forward in the web history.
[read-only] loadProgress : int
The current load progress of the web content, represented as an integer between 0 and 100.
[read-only] loading : bool
[read-only] title : string
The title of the currently loaded web page.
url : url
loadingChanged ( WebViewLoadRequest loadRequest )
This signal is emitted when the state of loading the web content changes. By handling this signal it's possible, for example, to react to page load errors.
loadRequest parameter holds the url and status of the request, as well as an errorString containing an error message for a failed request.
另请参阅 WebViewLoadRequest .
加载指定 html content to the web view.
This method offers a lower-level alternative to the url property, which references HTML pages via URL.
External objects such as stylesheets or images referenced in the HTML document should be located relative to
. For example, if
is retrieved from
, which is the base URL, then an image referenced with the relative url,
, should be at
注意： WebView does not support loading content through the Qt Resource system.
另请参阅 url .
重新加载当前 url .
停止加载当前 url .