summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-02-21 16:08:37 +0100
committerKai Koehne <kai.koehne@qt.io>2019-02-21 15:22:14 +0000
commitf5bad87426599ff52e382aa7e0698a7e4b4b62de (patch)
treecceccbf1840c3a748b287b0b2ffef855aff7e10b
parent7537526093c92e89672d1e952a9baceecaa91730 (diff)
Doc: Copy minimal example code into overview page
After change cfe53bce9, the 'minimal' example isn't that minimal anymore. Rather copy the few lines, like we already do for the widget example. Change-Id: I9dd818738edb8d229f54ff24822d4c1723376ccc Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc16
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 bd5569e3f..d83a65bdb 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