summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebengineinspector_lgpl.qdoc
blob: 2e0c6ec821ac2aceea656152246674507ad56d17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
    Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.
*/

// The documentation in this file was imported from QtWebKit and is thus constrained
// by its LGPL license. Documentation written from scratch for new methods should be
// placed inline in the code as usual.

/*!
    \class QWebEngineInspector
    \since 4.6
    \inmodule QtWebEngine
    \brief The QWebEngineInspector class allows the placement and control of a
    QWebEnginePage'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 QWebEnginePage to be inspected must be specified using the setPage() method.

    A typical use of QWebEngineInspector follows:

    \snippet snippets/qtwebengine_qwebengineinspector_snippet.cpp 0

    A QWebEngineInspector can be made visible either programmatically using
    setVisible(), or by the user through the attached QWebEnginePage's context
    menu.

    \note A QWebEngineInspector will display a blank widget if either:
    \list
        \li page() is null
        \li QWebEngineSettings::DeveloperExtrasEnabled is false
    \endlist

    \section1 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
    QWebEnginePage and are allocated the first time that:
    \list
        \li an element is inspected
        \li the QWebEngineInspector is shown.
    \endlist

    \section1 Inspector configuration persistence

    The inspector allows the user to configure some options through its
    user interface (e.g. the resource tracking "Always enable" option).
    The inspector UI is itself a web page and is using HTML local storage
    to persist those settings.
    Since the internal QWebEnginePage used by the inspector isn't exposed in the API,
    the only way to enable those settings to be persisted is currently to enable
    local storage globally through QWebEngineSettings::globalSettings().

    \sa QWebEngineSettings::localStoragePath(), QWebEngineSettings::LocalStorageEnabled
*/

/*!
    \fn QWebEngineInspector::QWebEngineInspector(QWidget* parent)
    Constructs an unbound QWebEngineInspector with \a parent as its parent.
*/

/*!
    \fn QWebEngineInspector::~QWebEngineInspector()
    Destroys the inspector.
*/

/*!
    \fn void QWebEngineInspector::setPage(QWebEnginePage* page)
    Bind this inspector to the QWebEnginePage to be inspected.

    \b {Notes:}
    \list
        \li There can only be one QWebEngineInspector associated with a QWebEnginePage
           and vice versa.
        \li Calling this method with a null \a page will break the current association, if any.
        \li If \a page is already associated to another QWebEngineInspector, the association
           will be replaced and the previous QWebEngineInspector will become unbound
    \endlist

    \sa page()
*/

/*!
    \fn QWebEnginePage* QWebEngineInspector::page() const
    Returns the inspected QWebEnginePage.
    If no web page is currently associated, a null pointer is returned.
*/