diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-04 11:43:54 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-04 11:45:58 +0100 |
commit | 2b3f5b66af4f06a57216575a44f54c1d20fb12a0 (patch) | |
tree | b58f6a31b9d97b4693d485ea1a794fa6b8c5d875 /src/webengine/doc/src/qtwebengine-overview.qdoc | |
parent | 4dc312011bcaa2ee2cf812b5b84dc9238130e608 (diff) | |
parent | 56fadb571f32b721d8b99554e6e38692009ec37f (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I1dd136df7004b11e2f38a2ec4e82a6fa81627479
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 |