Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. processEvents - Filter paintEvents

processEvents - Filter paintEvents

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dheerendraD Offline
    dheerendraD Offline
    dheerendra
    Qt Champions 2022
    wrote on last edited by
    #1

    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.

    Dheerendra
    @Community Service
    Certified Qt Specialist
    http://www.pthinks.com

    kshegunovK 1 Reply Last reply
    3
    • dheerendraD dheerendra

      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.

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      @dheerendra
      Hi,
      You could try this:

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

      Kind regards.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      3
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

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

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        5

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved