If it wasn't for the QObject, we could probably just use the C++ standard thread class. However, a QObject can emit and receive signals and Qt offers infrastructure to do so in a multithread-safe (MT-safe) way. In order to be able to understand this mechanism, we have first to take a look at signals, slots, and asynchronous processing in Qt.
Threads, events, and QObjects
Events and event loop
Qt is an event-driven toolkit and this means that we are always reacting to some events occurring in the system. Thus, we are doing all things asynchronously—we will be notified of something, then we react to it in some specific callback, and then we are done. So, our program isn't one single code strand, it's rather...