summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-28 15:41:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-04 16:55:08 +0200
commit495c4d501e9258a0e86862fc9d4b5b4cbee14470 (patch)
tree004373bf18d99ebdb9f0ca1cc547c300befd9ada /src
parent9a4beb4d36dc0c613e59aa5d88060d521462f56c (diff)
Make it possible to render QtWebEngine in QOpenGLWidget
Setup the GL context as shared with the Qt global share context. Change-Id: I199cfc7d290466d0ad99294bcffcd738b615862b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index c2f7a9b184..03655639d5 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -79,6 +79,7 @@
#include "qfileinfo.h"
#include <QtGui/qinputmethod.h>
#include <QtGui/qopenglcontext.h>
+#include <QtGui/private/qopenglcontext_p.h>
#include <private/qgraphicseffect_p.h>
#include <qbackingstore.h>
@@ -11148,6 +11149,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const
QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this);
if (!extra->topextra->shareContext) {
QOpenGLContext *ctx = new QOpenGLContext();
+ ctx->setShareContext(QOpenGLContextPrivate::globalShareContext());
ctx->setFormat(extra->topextra->window->format());
ctx->create();
that->extra->topextra->shareContext = ctx;