Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to clear events in eventloop of a Qt thread

    Mobile and Embedded
    2
    3
    2822
    Loading More Posts
    • 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.
    • S
      SivaRamaKrishna last edited by

      Hi,
      i have a use case in which i have a set of classes say <A,B,C,D> and <E,F,G,H>.
      Class 'A' signal method is connected to class 'E' slot.
      Class 'B' signal method is connected to class 'F' slot.
      similarly C,D are connected to G,H
      Now objects of A,B,C,D are moved to one thread
      and objects of E,F,G,H are moved to another thread.
      So if a signal from thread 1 comes and it gets queued up in event loop of 2nd thread.
      Assume class D signal has high priority. if class 'D' signal is invoked, I should clear all the events queued up in event loop of thread 2 which are generated by A,B,C. Is it possible to clear an event loop of a thread?
      Please enlighten me on this.

      Thanks
      sivaramakrishna

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        AFAIK, no. You probably would have to implement your own QAbstractEventDispatcher

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • S
          SivaRamaKrishna last edited by

          OK Thank you SGaist.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post