[PyQt] Paint sync issue with OpenGL widget inside MDI area
c c
coastalchaos at hotmail.co.uk
Wed Jan 20 19:07:31 GMT 2016
Tom,
That looks like an X rayed gentleman sausage!
Rob
> On 20 Jan 2016, at 17:29, Thomas Robitaille <thomas.robitaille at gmail.com> wrote:
>
> Hi everyone,
>
> I am trying to add an OpenGL widget in an application I am working on
> in order to display data. However, I'm running into an issue which is
> that if I try and add the OpenGL widget to an MDI area, there is a
> very noticeable spatial lag between where the Qt window is drawn and
> the OpenGL canvas when dragging the MDI window around. Here's a short
> screencast demonstrating this problem:
>
> https://www.youtube.com/watch?v=wBg8SRpa580&feature=youtu.be
>
> I see this effect even with the following simple example:
>
> import numpy as np
>
> from PyQt4 import QtGui, QtOpenGL
>
> qtapp = QtGui.QApplication([''])
>
> viewer = QtOpenGL.QGLWidget()
> viewer.resize(600,600)
>
> widget = QtGui.QMainWindow()
>
> mdi = QtGui.QMdiArea()
> widget.setCentralWidget(mdi)
>
> sub = QtGui.QMdiSubWindow()
> sub.setWidget(viewer)
> mdi.addSubWindow(sub)
> sub.resize(600,600)
>
> widget.show()
>
> qtapp.exec_()
>
> Even though nothing is drawn in the OpenGL canvas, if you move the
> sub-window from side to side, you'll see that the OpenGL canvas tends
> to move ahead of the Qt sub-window.
>
> Does anyone know how to avoid this issue?
>
> Thanks!
> Tom
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list