summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-06 15:18:06 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-06 16:30:14 +0200
commit678076faeabd7e827abe31f72f4220af8d8f95ac (patch)
tree47659878276e369d3b07075d24861a795dc564b2 /src/webenginewidgets
parent08203aef3ab102bfb91928f37846b2b19a4540ee (diff)
Select opengl RHI backend while we still use QQuickWidget
QQuickWidget depends on using the OpenGL backend. Change-Id: I3679e90723930b3fd627a0ce03935dcca0372212 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
index 5949f3d6e..76f422e9d 100644
--- a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
+++ b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
@@ -41,6 +41,7 @@
#include <QCoreApplication>
#include <QOpenGLContext>
+#include <QQuickWindow>
namespace QtWebEngineCore
{
@@ -67,6 +68,7 @@ static void initialize()
}
//QCoreApplication is not yet instantiated, ensuring the call will be deferred
qAddPreRoutine(QtWebEngineCore::initialize);
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
#endif // QT_CONFIG(opengl)
}