diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2016-04-08 16:41:29 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2016-04-11 07:02:01 +0000 |
commit | c9cd7497cbb38de9bc74ec3da5858234d7794fdb (patch) | |
tree | f89534324afefc2239bc55ae51c1f50d2b7028ba | |
parent | 56955e73d4be21bc3f086d1c805352a96944a25c (diff) |
Doc: initializing web engine when running it as a plugin
Change-Id: I27981327fb563fdd6697352582c2cbc99b173ccc
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 18 |
1 files changed, 18 insertions, 0 deletions
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 |