Re: GUI Unhappy With QTimer
Try this:
Code:
...::onIdle()
{
// do something...
qApp->processEvents();
}
Re: GUI Unhappy With QTimer
The UI is blocked until "do something" finishes. If "do something" is long running then you should read: [wiki=Keeping_the_GUI_Responsive]Keeping the GUI responsive[/wiki]
Re: GUI Unhappy With QTimer
I did. It solved the problem, but it created another which is now the context menu stucks cannot be closed or perform any action on the main window
like closing or resizing...
I'm using another timer btw, the boost::chrono inside the QTimer event to lock to a specific frame rate.
Re: GUI Unhappy With QTimer
Not lengthy operation at all. It's supposed to do "something" that does not take longer than 1/60 of a second.
the app->processEvents() did not really solve the problem. It prevents window events abruptly.
The version I'm using is 7.4.7. Probably a bug? Something not suitable for Qt?
So if this is the case, I would suggest for the 4.8 or future releases to expose a standard OnIdle event handler instead of hacking it using a timer.
Re: GUI Unhappy With QTimer
Yup it's a big bug. I already reported this bug to the Qt team. Hopefully it'll be solved in the next release. Thanks for help anyway.