13 May 2022
Asynchronous signals and slots are a great way to communicate between threads - as Qt manages the thread synchronization.
Each QThread has it's own Qt event queue and loop - QApplication comes with one - and is what is started when you call qApp.exec().
The way it works is that when you emit a signal in one thread, and it is received by an object that is in another thread, an event that encodes the slot to call, the arguments, and the target object is posted on the Qt event queue of the thread of that object. Qt manages the thread synchronization of posting the message generated in one thread applied to the event queue of the other thread. Then, when the event queue is next serviced by the target object's thread, the event processing code will do the calling of the slot with the provided arguments.
However, for that all to work, you need to have event loops started on both threads.