In Qt, does a QThread's event loop block while a slot on a QObject owned by the event loop's thread is executing? In Qt, does a QThread's event loop block while a slot on a QObject owned by the event loop's thread is executing? multithreading multithreading

In Qt, does a QThread's event loop block while a slot on a QObject owned by the event loop's thread is executing?


The event loop of the worker thread will be blocked, i.e. you won't be able to process any events (including those which are used for 'queued' connections between signals and slots, which is what you get when doing signal-slot connections across threads) unless you explicitely trigger a call to the event loop object yourself.

You can however still have slots executed in your worker thread triggered by signals which are emitted from the worker thread, because those are plain function calls and don't need a running event loop.