Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to clear events in eventloop of a Qt thread
Forum Updated to NodeBB v4.3 + New Features

How to clear events in eventloop of a Qt thread

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 3.4k Views 2 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.
  • S Offline
    S Offline
    SivaRamaKrishna
    wrote on 7 Oct 2015, 07:59 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Oct 2015, 23:11 last edited by
      #2

      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
      0
      • S Offline
        S Offline
        SivaRamaKrishna
        wrote on 9 Oct 2015, 06:13 last edited by
        #3

        OK Thank you SGaist.

        1 Reply Last reply
        0

        1/3

        7 Oct 2015, 07:59

        • Login

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