True tells you that the message has been successfully queued. This does not mean that the message in the queue has been processed ...
Say your program has 10 threads (Thread1-Thread10). You are sending a message to the queue from Thread7. What thread will be queued? And when will the items in this queue be processed?
The answer is that everyone QObjecthas something called Affinity , and this is the thread in which the queue will be executed in the queue. The default affinity refers to the thread in which the object was created (but you can change it with QObject::moveToThread().)
- GUI, , this, GUI. QObject::thread().
, , ... - , . , , QThread::exec(). , , , , exec.
( QMetaObject::invokeMethod . , .)