Note
This class was introduced in Qt 4.6
The PySide.QtWebKit.QWebInspector class allows the placement and control of a PySide.QtWebKit.QWebPage ‘s inspector. The inspector can display a page’s hierarchy, its loading statistics and the current state of its individual elements. It is mostly used by web developers.
The PySide.QtWebKit.QWebPage to be inspected must be specified using the PySide.QtWebKit.QWebInspector.setPage() method.
A typical use of PySide.QtWebKit.QWebInspector follows:
# ... page = QWebPage() # ... inspector = QWebInspector() inspector.setPage(page)A PySide.QtWebKit.QWebInspector can be made visible either programmatically using PySide.QtGui.QWidget.setVisible() , or by the user through the attached PySide.QtWebKit.QWebPage ‘s context menu.
Note
A PySide.QtWebKit.QWebInspector will display a blank widget if either:
- PySide.QtWebKit.QWebInspector.page() is null
- QWebSettings.DeveloperExtrasEnabled is false
This class acts mostly as a container and a controller for the inspector. Most of the resources needed by the inspector are owned by the associated PySide.QtWebKit.QWebPage and are allocated the first time that:
- an element is inspected
- the PySide.QtWebKit.QWebInspector is shown.
The inspector allows the user to configure some options through its user interface (e.g. the resource tracking “Always enable” option). These settings will be persisted automatically by QtWebKit only if your application previously called QCoreApplication.setOrganizationName() and QCoreApplication.setApplicationName() . See PySide.QtCore.QSettings ‘s default constructor documentation for an explanation of why this is necessary.
Parameters: | parent – PySide.QtGui.QWidget |
---|
Constructs an unbound PySide.QtWebKit.QWebInspector with parent as its parent.
Return type: | PySide.QtWebKit.QWebPage |
---|
Returns the inspected PySide.QtWebKit.QWebPage . If no web page is currently associated, a null pointer is returned.
Parameters: | page – PySide.QtWebKit.QWebPage |
---|
Bind this inspector to the PySide.QtWebKit.QWebPage to be inspected.
Notes:
See also