If an object of type QObject is moved to a thread with QObject::moveToThread, all signals that the object receives are handled inside that thread. However, if a slot is called directly (object->theSlot()) that call will still block. What would be the normal way of executing that call inside the thread and returning control to the calling thread immediately? Hacks with QTimer don’t count. Setting up a single purpose connection and deleting it again might count as a solution if all else fails.
If an object of type QObject is moved to a thread with QObject::moveToThread ,
Share
You could use
QMetaObject::invokeMethodwith Qt::ConnectionType set to Qt::QueuedConnection