WebView QML Type
A component for displaying web content More...
|Import Statement:||import QtWebView 1.0|
- void goBack()
- void goForward()
- void loadHtml(string html, url baseUrl)
- void reload()
- void stop()
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.
Note: Due to platform limitations overlapping the WebView and other QML components is not supported.
The current load progress of the web content, represented as an integer between 0 and 100.
True if the WebView is currently in the process of loading new content, and false if not.
url : url
The url of currently loaded web page. Changing this will trigger loading new content.
The url is used as-is. Urls that originate from user input should be parsed with QUrl::fromUserInput.
void loadHtml(string html, url baseUrl)
Loads the specified 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 baseUrl. For example, if html is retrieved from
http://www.example.com/documents/overview.html, which is the base url, then an image referenced with the relative url,
diagram.png, should be at
See also QtWebView::WebView::url.
© 2016 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.