From c9cd7497cbb38de9bc74ec3da5858234d7794fdb Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 8 Apr 2016 16:41:29 +0200 Subject: Doc: initializing web engine when running it as a plugin Change-Id: I27981327fb563fdd6697352582c2cbc99b173ccc Reviewed-by: Kai Koehne --- src/webengine/doc/src/qtwebengine-overview.qdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 08424f7c2..72f2e1a64 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -157,6 +157,24 @@ a QWebEngineCookieStore for accessing the HTTP cookies of Chromium. A QWebEnginePage can also directly point to a script collection. + For a widget based application, the web engine is automatically initialized, unless it is + placed in a plugin. In that case, it must be initialized in the application main source file + by using \l QtWebEngine::initialize, as illustrated by the following code snippet: + + \code + int main(int argc, char **argv) + { + QApplication app(argc, argv); + + QtWebEngine::initialize(); + + QMainWindow window; + window.show(); + + return app.exec(); + } + \endcode + \section1 Embedding Web Content into Qt Quick Applications The WebEngineView QML type allows Qt Quick applications to render regions of dynamic web -- cgit v1.2.3