How to clear events in eventloop of a Qt thread
-
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 -
Hi and welcome to devnet,
AFAIK, no. You probably would have to implement your own QAbstractEventDispatcher
Hope it helps
-
OK Thank you SGaist.