What is an event loop in Qt?
Now, when we say event loop, does it mean that there is some while loop running in the internal code of Qt, and in that while loop the method of handling signals and slots is written?
In a sense, yes. Most software these days sits and waits for events -- user input, network traffic, timer events, sensors, etc. -- and responds accordingly.
This is not specific to Qt. It's a common design pattern you'll find everywhere from Windows to Android to Arduino.
Related videos on Youtube

Aquarius_Girl
Arts and Crafts.stackexchange.com is in public beta now. Join us!
Updated on June 04, 2022Comments
-
Aquarius_Girl 7 months
I have understood the following regarding QApplication's
exec
function:QApplication exec starts the main event loop. It launches the GUI. It processes the signals and calls appropriate slots on receiving them. It waits until exit is called and returns the value which was set in exit.
Now, when we say event loop, does it mean that there is some while loop running in the internal code of Qt, and in that while loop the method of handling signals and slots is written?
-
Omid CompSCI about 6 yearsEvent loop means that your code is continuously running, think about it as being refreshed every time, so changes will be seen and made continuously based off your cases you have.
-
thuga about 6 yearsDirectly connected slots don't go to the event queue, only queued connections.
-
Andre about 6 yearsThis was really helpful to me, have a look link
-
Kuba hasn't forgotten Monica about 6 yearsNote that the event loop has nothing to do with the concept of signals and slots per se. It is used as an implementation detail in delivering slot/functor calls in queued connections or across threads in automatic connections.
-