Qt 4.5 – Is emitting signal a function call, or a thread, and does it blocks?

It depends. From the documentation:

When a signal is emitted, the slots connected to it are usually executed immediately, just like a normal function call. When this happens, the signals and slots mechanism is totally independent of any GUI event loop. Execution of the code following the emit statement will occur once all slots have returned. The situation is slightly different when using queued connections; in such a case, the code following the emit keyword will continue immediately, and the slots will be executed later.

So in normal cases, it will be synchronous and blocking, and with queued connections it will be asynchronous and non-blocking.

Leave a Comment