diff options
Diffstat (limited to 'src/webengine/doc/src/qtwebengine-overview.qdoc')
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 4ac5108b1..58c0708cc 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -149,9 +149,19 @@ engine must be initialized by using \l QtWebEngine::initialize in the application main source file, as illustrated by the following code snippet: - \quotefromfile webengine/minimal/main.cpp - \skipto main - \printuntil } + \code + int main(int argc, char *argv[]) + { + QGuiApplication app(argc, argv); + + QtWebEngine::initialize(); + + QQmlApplicationEngine engine; + engine.load(QUrl("qrc:/main.qml")); + + return app.exec(); + } + \endcode An application can load pages into the WebEngineView, using either an URL or HTML string, and navigate within session history. By default, links to different pages load within the same |