diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-05-16 14:59:49 +0200 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2014-05-19 18:49:01 +0300 |
commit | 640c78665ffca949ad4c1773df7eddb1bdb9f1a2 (patch) | |
tree | 7d075bdfddd1b49be6feb5c59cf8c252e2fdebf0 /basicsuite/shared/main.cpp | |
parent | 79456705728f87be45392f3d87758d84665459fd (diff) |
Add a simple WebEngine demo to the B2Qt basicsuite
Add a simple demo browser which by default loads the local webgl
example. Move the webgl example to the root directory to be deployed.
Change-Id: Icb0442ef37dcb31e6e1d33eee279bf429c566106
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'basicsuite/shared/main.cpp')
-rw-r--r-- | basicsuite/shared/main.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index d33b09c..d5b203f 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -34,14 +34,27 @@ #include <QtQml/QQmlContext> #include <QtQml/QQmlComponent> -#include "engine.h" +#if defined(USE_QTWEBENGINE) +#include <qtwebengineglobal.h> +#endif +#include "engine.h" int main(int argc, char **argv) { //qputenv("QT_IM_MODULE", QByteArray("qtvkb")); QApplication app(argc, argv); + + +#if defined(USE_QTWEBENGINE) + // This is currently needed by all QtWebEngine applications using the HW accelerated QQuickWebView. + // It enables sharing the QOpenGLContext of all QQuickWindows of the application. + // We have to do so until we expose a public API for it in Qt or choose to enable it + // by default earliest in Qt 5.4.0. + QWebEngine::initialize(); +#endif + QString path = app.applicationDirPath(); QPalette pal; |