summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/quicknanobrowser/main.cpp8
-rw-r--r--examples/quick/quicknanobrowser/quicknanobrowser.pro2
2 files changed, 10 insertions, 0 deletions
diff --git a/examples/quick/quicknanobrowser/main.cpp b/examples/quick/quicknanobrowser/main.cpp
index 982c1eb7a..6c2f91de6 100644
--- a/examples/quick/quicknanobrowser/main.cpp
+++ b/examples/quick/quicknanobrowser/main.cpp
@@ -47,11 +47,19 @@ typedef QApplication Application;
#include <QtGui/QGuiApplication>
typedef QGuiApplication Application;
#endif
+#include <QtQuick/private/qsgcontext_p.h>
int main(int argc, char **argv)
{
Application app(argc, argv);
+ // This is currently needed by all QtWebEngine application using the HW accelerated QQuickWebView.
+ // It enables sharing between the QOpenGLContext of all QQuickWindows of the application.
+ // We have to do so until we expose a public API for it, or chose enable it by default in Qt 5.3.0.
+ QOpenGLContext shareContext;
+ shareContext.create();
+ QSGContext::setSharedOpenGLContext(&shareContext);
+
ApplicationEngine appEngine;
return app.exec();
diff --git a/examples/quick/quicknanobrowser/quicknanobrowser.pro b/examples/quick/quicknanobrowser/quicknanobrowser.pro
index c32540a71..2132b031a 100644
--- a/examples/quick/quicknanobrowser/quicknanobrowser.pro
+++ b/examples/quick/quicknanobrowser/quicknanobrowser.pro
@@ -12,6 +12,8 @@ RESOURCES += resources.qrc
RESOURCES += ../../common/common_resources.qrc
QT += qml quick
+QT_PRIVATE += quick-private gui-private core-private
+
qtHaveModule(widgets) {
QT += widgets # QApplication is required to get native styling with QtQuickControls
}