[Qt-interest] UpdateGL() not working from WheelEvent()
Mike Hunt
ionel71089 at yahoo.com
Thu Jun 9 12:39:29 CEST 2011
I'm making a rubik-cube game in Qt using OpenGL.
I'm trying to move the "camera" (using gluLookAt) around the cube using the mouse.
In the mouseMoveEvent() of my widget I change the camera pitch and yaw, and then call updateGL(), which works correctly.
In the wheelEvent() I change the zoom of the camera and then call updateGL(), but this time it doesn't work anymore.
I've tried using a timer, queued connected slots to no results.
I am aware that you cannot update the GUI from another thread in most libraries, but don't know how to do it in Qt.
What's the equivalent in Qt of the commonly used "if (InvokeRequired) invoke(...)" in C# .NET ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110609/6578e563/attachment.html
More information about the Qt-interest-old
mailing list