[Qt-interest] QGLWidget Starving Application Event Handler
Marc Zinck
zinck at ciespace.com
Wed Apr 7 18:15:19 CEST 2010
I have encountered an issue where QGLWidget appears to starve the main
application event handler.
The problem is as follows:
I create a class that inherits from QGLWidget (lets call it
myQGLWidget). myQGLWidget reimplements initializeGL(), paintGL(),
resizeGL(), mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent() and
keyPressEvent().
myQGLWidget has a signal called renderingComplete() which is emited at
the end of paintGL(). The main application connects this signal to a
function which updates a label with the current fps value from
myQGLWidget by calling myQGLWidget::getFps().
When I quickly interact with the myQGLWidget with the mouse the label
updating appears blocked until I stop moving the mouse. If I interact
slowly, thus reducing the frequency of mouse events, the fps label is
updated regularly.
The same behavior is observed with the example application hellogl.
The behavior appears when running the application in Windows XP 64bit
but does does not appear when the application is run on Windows 7.
Should I be forcing an application event handling loop from inside
myQGLWidget?
Qt Version 4.6.2
Thank you for your help,
Marc
More information about the Qt-interest-old
mailing list