processEvents - Filter paintEvents
I'm have single threaded application which has StateMachine and CustomWidget. When I stop the statemachine it does not stop immediately as it is processed through event loop. I need to call qApp->processEvents() to stop the statemachine immidiately. If I call processEvents, it processes the paint events also. This makes the UI flickered. UI ficker is main issue.
I would like to call processEvents but I don't want to process the paint events. Is there way ?
Is there way to stop the statemachine immidiately without calling processEvents.
You could try this:
QCoreApplication::sendPostedEvents(NULL, QEvent::StateMachineSignal); QCoreApplication::sendPostedEvents(NULL, QEvent::StateMachineWrapped);
Thank you for you reply. Problem was caused by half-done paintEvent function and recursion. After careful analysing issue is resolved.