path: root/tests/quicktestbrowser
diff options
authorSimon Hausmann <>2014-03-26 12:21:25 +0100
committerThe Qt Project <>2014-03-31 18:36:46 +0200
commit3d6d6594b0dd2a8860b8fddd5a58f86c4ebd255c (patch)
tree5a9959d433425d8ff1a1d78d1b2506a1fd147770 /tests/quicktestbrowser
parent3512a6cfe07cb7108485b3e39d586612aa5ed3d8 (diff)
Centralize OpenGL initialization
We now require the user to use QWebEngine::initialize() in main (preferably) and print out an error message if this wasn't set up accordingly. This limits the use of private scene graph API to inside QWebEngine and offers public API for users of the API. Change-Id: I787c176a85ab7784dbc8787d9876960b4872959e Reviewed-by: Jocelyn Turcotte <>
Diffstat (limited to 'tests/quicktestbrowser')
2 files changed, 3 insertions, 9 deletions
diff --git a/tests/quicktestbrowser/main.cpp b/tests/quicktestbrowser/main.cpp
index 6c2f91de..1e592f3e 100644
--- a/tests/quicktestbrowser/main.cpp
+++ b/tests/quicktestbrowser/main.cpp
@@ -47,18 +47,13 @@ typedef QApplication Application;
#include <QtGui/QGuiApplication>
typedef QGuiApplication Application;
-#include <QtQuick/private/qsgcontext_p.h>
+#include <qtwebengineglobal.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);
+ QWebEngine::initialize();
ApplicationEngine appEngine;
diff --git a/tests/quicktestbrowser/ b/tests/quicktestbrowser/
index 83baa73f..b0146a68 100644
--- a/tests/quicktestbrowser/
+++ b/tests/quicktestbrowser/
@@ -13,8 +13,7 @@ OTHER_FILES += ContextMenuExtras.qml \
RESOURCES += resources.qrc
-QT += qml quick
-QT_PRIVATE += quick-private gui-private core-private
+QT += qml quick webengine
qtHaveModule(widgets) {
QT += widgets # QApplication is required to get native styling with QtQuickControls