#8192 Use nullptr as parent to the OpenGL widget to avoid Qt bug

This commit is contained in:
Magne Sjaastad
2021-11-05 08:04:21 +01:00
parent 1655966a22
commit 12d0e9b89d

View File

@@ -312,7 +312,11 @@ QWidget* Rim3dView::createViewWidget( QWidget* mainWindowParent )
QGLFormat glFormat;
glFormat.setDirectRendering( RiaGuiApplication::instance()->useShaders() );
m_viewer = new RiuViewer( glFormat, mainWindowParent );
// If parent widget is a live widget, the application will get OpenGL window issues if started on a non-primary
// screen. Using nullptr as parent solves the issue.
// https://github.com/OPM/ResInsight/issues/8192
//
m_viewer = new RiuViewer( glFormat, nullptr );
m_viewer->setOwnerReservoirView( this );
cvf::String xLabel;