2010-08-18

Slitaz -- Qt / aqp / browserwindow



Advanced Qt Programming by Mark Summerfield
ISBN: 978-0321635907

QWebInspector: QSettings couldn't read configuration setting [debuggerEnabled].
QWebInspector: QSettings couldn't read configuration setting [profilerEnabled].
QWebInspector: QSettings couldn't read configuration setting [frontendSettings].
QWebInspector: QSettings couldn't persist configuration setting [lastActivePanel].
QWebInspector: QSettings couldn't persist configuration setting [lastActivePanel].
QWebInspector: QSettings couldn't persist configuration setting [frontendSettings].
QWebInspector: QSettings couldn't persist configuration setting [frontendSettings].

main.cpp
[..]
#ifdef DEBUG
webSettings->setAttribute(QWebSettings::DeveloperExtrasEnabled,
true);
#endif
[..]

QWebSettings::DeveloperExtrasEnabled 7

Enables extra tools for Web developers. Currently this enables the "Inspect" element in the context menu as well as the use of QWebInspector which controls the web inspector for web site debugging. This is disabled by default.

----
browserwindow.cpp
[..]
#ifdef DEBUG
actions << webView->pageAction(QWebPage::InspectElement);
#endif
[..]

QWebPage::InspectElement 49
Show the Web Inspector with the currently highlighted HTML element.


QWebInspector Class Reference
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. More...

Detailed Description
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.
The QWebPage to be inspected must be specified using the setPage() method.
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 using setVisible(), or by the user through the attached QWebPage's context menu.

Note: A QWebInspector will display a blank widget if either:
page() is null
QWebSettings::DeveloperExtrasEnabled is false

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