From 495c4d501e9258a0e86862fc9d4b5b4cbee14470 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 28 Mar 2014 15:41:29 +0100 Subject: 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 --- src/widgets/kernel/qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 #include +#include #include #include @@ -11148,6 +11149,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const QWidgetPrivate *that = const_cast(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; -- cgit v1.2.3