QWebInspector Class Reference

[ QtWebKit module]

The QWebInspector class allows the placement and control of a 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. 更多...

继承 QWidget .

方法


详细描述

The QWebInspector class allows the placement and control of a 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.

QWebPage to be inspected must be specified using the setPage () 方法。

A typical use of QWebInspector follows:

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

A QWebInspector can be made visible either programmatically 使用 setVisible (), or by the user through the attached QWebPage 's context menu.

注意: A QWebInspector will display a blank widget if either:

资源

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 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 (). 见 QSettings 's default constructor documentation for an explanation of why this is necessary.


方法文档编制

QWebInspector.__init__ ( self , QWidget   parent  = None)

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

Constructs an unbound QWebInspector with parent as its parent.

QWebInspector.closeEvent ( self , QCloseEvent   event )

重实现自 QWidget.closeEvent ().

bool QWebInspector.event ( self , QEvent )

重实现自 QObject.event ().

QWebInspector.hideEvent ( self , QHideEvent   event )

重实现自 QWidget.hideEvent ().

QWebPage QWebInspector.page ( self )

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

另请参阅 setPage ().

QWebInspector.resizeEvent ( self , QResizeEvent   event )

重实现自 QWidget.resizeEvent ().

QWebInspector.setPage ( self , QWebPage   page )

Bind this inspector to the QWebPage to be inspected.

注意事项:

另请参阅 page ().

QWebInspector.showEvent ( self , QShowEvent   event )

重实现自 QWidget.showEvent ().

QSize QWebInspector.sizeHint ( self )

重实现自 QWidget.sizeHint ().