summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-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;