Order of slots called on QObject

前端 未结 4 788
囚心锁ツ
囚心锁ツ 2020-12-15 03:36

I have a QObject that has multiple slots connected to one of its signals. Is there an order in which of each of these slots are called when the signal is emitted?

4条回答
  •  独厮守ぢ
    2020-12-15 04:05

    While the order is undefined, up to now, in all Qt versions it has been connect() order, except when Qt::QueuedConnection is used, in which case, of course, it's not even guaranteed that any or all slots have been executed when emit returns. Relying on the order is still discouraged, though.

提交回复
热议问题