From 2b8bc44a88490d359b986ecfbf7c71d8216daa4c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 11 Jan 2018 13:21:05 +0100 Subject: Don't recreate QOpenGLContext when the application is sharing contexts Task-number: QTBUG-63304 Change-Id: Idfefb246a15166e04c0db0c894a705a7be2ecf67 Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quickwidgets') diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index df28ff964a..fd1ae52298 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -934,7 +934,7 @@ void QQuickWidget::createFramebufferObject() } QOpenGLContext *shareWindowContext = QWidgetPrivate::get(window())->shareContext(); - if (shareWindowContext && context->shareContext() != shareWindowContext) { + if (shareWindowContext && context->shareContext() != shareWindowContext && !qGuiApp->testAttribute(Qt::AA_ShareOpenGLContexts)) { context->setShareContext(shareWindowContext); context->setScreen(shareWindowContext->screen()); if (!context->create()) -- cgit v1.2.3