What is an event loop in Qt?

前端 未结 1 747
太阳男子
太阳男子 2020-12-09 13:44

I have understood the following regarding QApplication\'s exec function:

QApplication exec starts the main event loop. It launches the

相关标签:
1条回答
  • 2020-12-09 14:15

    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.

    0 讨论(0)
提交回复
热议问题