Reputation: 12904
What is the relation between QEventloop
and QAbstractEventDispatcher
?
Event loop is a loop that runs the event dispatcher until the loop is broken.
But in Documentation of QEventLoop
there is no single method that takes an QAbstractEventDispatcher
as argument.
Upvotes: 5
Views: 1976
Reputation: 1220
Why should there be a method in QEventLoop that takes a Subclass of QAbstractEventDispatcher
?
In every application, or more precise in every thread there is only one QAbstractEventDispatcher
subclass instance which is only processing incomint system/Qt events and dispatches them to the Q(Core)Application
. The QAbstractEventDispatcher
is only a helper, it isn't listening to events, it has to be triggered, for example by a QEventLoop
. The Eventloop is basically a infinite loop which uses the thread global event dispatcher to dispatch events if need be.
I hope that clears it up a little.
Upvotes: 3