Thanks, this solved it. I would probably end up sharing the context between all QOpenGLWidget so I guess your workaround is a permanent solution for this app.
On Tue, Mar 28, 2017 at 9:02 AM, Laszlo Agocs <laszlo.ag...@qt.io> wrote: > Hi, > > > Because it tears down and then reinitializes graphics resources when > changing the associated top-level window. This does not explain the > flicker, though. As a workaround try doing QCoreApplication:: > setAttribute(Qt:AA_ShareOpenGLContexts) before constructing the > QApplication. > > > See the sections starting with "Note: For widgets that change their > associated top-level window ..." in http://doc.qt.io/qt-5/ > qopenglwidget.html#resource-initialization-and-cleanup > > > > <http://doc.qt.io/qt-5/qopenglwidget.html#resource-initialization-and-cleanup>Best > regards, > > Laszlo > > > > > > ------------------------------ > *From:* Interest <interest-bounces+laszlo.agocs=qt...@qt-project.org> on > behalf of Alexandre Ribeiro <alexandregomesribe...@gmail.com> > *Sent:* Monday, March 27, 2017 11:58:55 PM > *To:* interest@qt-project.org > *Subject:* [Interest] QOpenGLWidget inside QDockWidget > > Hi, > > I've placed a QOpenGLWidget inside a QDockWidget and everything works as > expected. > > However when I drag the dockwidget from the main window there's a blue > flicker in the QOpenGLWidget. This blue flicker has nothing to do with my > OpenGL code (right now it's merely clearing the background with red). > > Any idea on what might be happening? > > Best regards, > Alex >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest