Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

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...

 #include <QWebInspector>

This class is not part of the Qt GUI Framework Edition.

Inherits QWidget.

This class was introduced in Qt 4.6.


Public Functions

QWebInspector ( QWidget * parent = 0 )
~QWebInspector ()
QWebPage * page () const
void setPage ( QWebPage * page )

Reimplemented Public Functions

virtual bool event ( QEvent * ev )
virtual QSize sizeHint () const
  • 217 public functions inherited from QWidget
  • 29 public functions inherited from QObject
  • 13 public functions inherited from QPaintDevice

Reimplemented Protected Functions

virtual void hideEvent ( QHideEvent * event )
virtual void resizeEvent ( QResizeEvent * event )
virtual void showEvent ( QShowEvent * event )
  • 37 protected functions inherited from QWidget
  • 7 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice

Additional Inherited Members

  • 58 properties inherited from QWidget
  • 1 property inherited from QObject
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject
  • 1 signal inherited from QWidget
  • 1 signal inherited from QObject
  • 4 static public members inherited from QWidget
  • 5 static public members inherited from QObject
  • 37 protected functions inherited from QWidget
  • 7 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice
  • 1 protected slot inherited from QWidget

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:

  • an element is inspected
  • the QWebInspector is shown.

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.


Member Function Documentation

QWebInspector::QWebInspector ( QWidget * parent = 0 )

Constructs an empty QWebInspector with parent parent.

QWebInspector::~QWebInspector ()

Destroys the inspector.

bool QWebInspector::event ( QEvent * ev )   [virtual]

Reimplemented from QObject::event().

void QWebInspector::hideEvent ( QHideEvent * event )   [virtual protected]

Reimplemented from QWidget::hideEvent().

QWebPage * QWebInspector::page () const

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

See also setPage().

void QWebInspector::resizeEvent ( QResizeEvent * event )   [virtual protected]

Reimplemented from QWidget::resizeEvent().

void QWebInspector::setPage ( QWebPage * page )

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().

void QWebInspector::showEvent ( QShowEvent * event )   [virtual protected]

Reimplemented from QWidget::showEvent().

QSize QWebInspector::sizeHint () const   [virtual]

Reimplemented from QWidget::sizeHint().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.6
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web