Home · All Classes · Modules

QWebInspector Class Reference
[QtWebKit module]

The QWebInspector class allows the placement and control of a QWebPage's inspector. The inspector allows you to see a page current hierarchy and loading statistics. More...

Inherits QWidget.

Methods


Detailed Description

The QWebInspector class allows the placement and control of a QWebPage's inspector. The inspector allows you to see a page current hierarchy and loading statistics.

The QWebPage to be inspected is determined with the setPage() method.

A typical use of QWebInspector follows:

     // ...
     QWebPage *page = new QWebPage;
     // ...

     QWebInspector *inspector = new QWebInspector;
     inspector->setPage(page);

     connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show()));

Note: A QWebInspector will display a blank widget if either:

Resources

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 QWebPage and are allocated the first time that:

Inspector configuration persistence

The inspector allows the user to configure some options through its interface (e.g. the resource tracking "Always enable" option). These settings are persisted automatically by QtWebKit using QSettings.

However since the QSettings object is instantiated using the empty constructor, QCoreApplication.setOrganizationName() and QCoreApplication.setApplicationName() must be called within your application to enable the persistence of these options.


Method Documentation

QWebInspector.__init__ (self, QWidget parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs an empty QWebInspector with parent parent.

bool QWebInspector.event (self, QEvent)

Reimplemented from QObject.event().

QWebInspector.hideEvent (self, QHideEvent)

Reimplemented from QWidget.hideEvent().

QWebPage QWebInspector.page (self)

Returns the inspected QWebPage. If no web page is currently associated, a null pointer is returned.

See also setPage().

QWebInspector.resizeEvent (self, QResizeEvent)

Reimplemented from QWidget.resizeEvent().

QWebInspector.setPage (self, QWebPage)

Sets the QWebPage to be inspected.

There can only be one QWebInspector associated with a QWebPage and vices versa.

Calling with page as null will break the current association, if any.

If page is already associated to another QWebInspector, the association will be replaced and the previous QWebInspector will have no page associated.

See also page().

QWebInspector.showEvent (self, QShowEvent)

Reimplemented from QWidget.showEvent().

QSize QWebInspector.sizeHint (self)

Reimplemented from QWidget.sizeHint().


PyQt 4.7.3 for X11Copyright © Riverbank Computing Ltd and Nokia 2010Qt 4.6.2