PDA

View Full Version : Order of signals and slots



Morea
26th February 2006, 22:54
Hi again.
If I have this method in a class:


int MyClass::foo()
{
emit MySignal();
return 4;
}

can I always be sure that the signal is emitted, code in slots are being run, and finished, and then it will return the value 4? No chanse of returning 4 before all slots and signals have finished?

jacek
26th February 2006, 23:09
All slots connected to this signal using direct connection will be executed immediately (like a function call), but those which use queued connections will be executed when appropriate event queue picks up the meta call event.