processEvents - Filter paintEvents



  • HI
    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 ?
    OR
    Is there way to stop the statemachine immidiately without calling processEvents.


  • Qt Champions 2016

    @dheerendra
    Hi,
    You could try this:

    QCoreApplication::sendPostedEvents(NULL, QEvent::StateMachineSignal);
    QCoreApplication::sendPostedEvents(NULL, QEvent::StateMachineWrapped);
    

    Kind regards.



  • Thank you for you reply. Problem was caused by half-done paintEvent function and recursion. After careful analysing issue is resolved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.