一、Qt 3.0(包含3.0) – Qt 4.5(包含4.5)版本之前

「多个槽函数绑定同一个信号是无序调用」。

官方文档是这样描述的:

If a signal is connected to several slots, the slots are activated in an arbitrary order when the signal is emitted.
如果信号连接到多个槽函数,则在发出信号时会以任意顺序调用槽函数。

文档出处在:

https://qt.developpez.com/doc/3.0/qobject/#connect
https://qt.developpez.com/doc/4.5/qobject/#connect

二、Qt 4.6(包含4.6)版本之后

「多个槽函数绑定同一个信号是顺序调用」。

官方文档是这样描述的:

If a signal is connected to several slots, the slots are activated in the same order as the order the connection was made, when the signal is emitted.
如果将信号连接到多个槽函数,则在发出信号时将按照与连接顺序相同的顺序调用槽函数。

文档出处在:

https://doc.qt.io/archives/4.6/qobject.html#connect
https://doc.qt.io/qt-5/qobject.html#connect-2

版权声明:本文为lcgbk原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/lcgbk/p/14153264.html