An event loop is a construct where a thread runs in a loop, in which it waits for events. Whenever it gets any event, that could be user interaction or timers or data arriving at sockets, etc, the thread will process them and finally return to waiting.
Basically something like
Qt Code:
while (true) { Event *event = getEvent(); processEvent(event); }To copy to clipboard, switch view to plain text mode
You already have that as part of your Qt application object. You start the event loop when you code in main() calls exec().
This main thread event loop handles all the UI events, but can of course also handle others.
Cheers,
_






Reply With Quote
Bookmarks