If I had a class A, where one of its functions does:
void A::func()
{
emit first_signal();
emit second_signal();
}
Assuming that a class B has 2 slots, one connected to first_signal
, and the other to second_signal
, is it guaranteed that the slot that is connected to first_signal
will always be processed before the second_signal
slot?
If you use direct connection type between signals and slots (Qt::DirectConnection) then the answer is yes.
From Qt help system:
You can change default connection type to any of enum Qt::ConnectionType in QObject::connect method.