QWebView acts as a view onto Web pages, each of which is represented by an instance of the QWebPage class. As a widget it can be embedded into your forms or a graphics view, and it provides convenience functions for downloading and rendering web sites.
The easiest way to render content is through the QWebView class. The QtWebKit module is part of the Qt Desktop Edition, and the Qt Open Source Edition. More information about WebKit itself can be found on the WebKit Open Source Project Web site. QtWebKit is based on the Open Source WebKit engine. In addition to providing pure rendering features, HTML documents can be made fully editable to the user through the use of the contenteditable attribute on HTML elements. Integration with the Qt networking module enables Web pages to be transparently loaded from Web servers, the local file system or even the Qt resource system. QtWebKit provides facilities for rendering of HyperText Markup Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript.Ī bridge between the JavaScript execution environment and the Qt object model makes it possible for custom QObjects to be scripted. At the same time Web content can be enhanced with native controls. QtWebKit provides a Web browser engine that makes it easy to embed content from the World Wide Web into your Qt application. To import the module use, for example, the following statement: from PyQt4 import QtWebKit