From f5bad87426599ff52e382aa7e0698a7e4b4b62de Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 21 Feb 2019 16:08:37 +0100 Subject: 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 --- src/webengine/doc/src/qtwebengine-overview.qdoc | 16 +++++++++++++--- 1 file 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 -- cgit v1.2.3