读书人

QT信号连接的槽函数是否有调用的顺序,

发布时间: 2012-04-10 21:03:56 作者: rapoo

QT信号连接的槽函数是否有调用的顺序
如题,信号先后连接两个槽函数,是否先调用第一个,之后调用第二个,是否有谁能给个权威一点的答案,谢谢

[解决办法]
同一个信号连接的多个槽,调用是无序的
[解决办法]
没有明确顺序。
[解决办法]
[Quote=引用:]

没有明确顺序。
[/Quote]
+1
[解决办法]
无序,书上说的
[解决办法]
你就当他们是一起并行运行的, 谢谢
[解决办法]

探讨

无序,书上说的

[解决办法]
探讨

引用:

无序,书上说的

呵呵,古语说的好,尽信书不如无书

你看的书已经过时了,建议以Qt 自带的 Manual 为准:

从Qt4.6开始,Manual中有这句话:

If several slots are connected to one signal, the slots will be executed one after t……

[解决办法]
探讨

引用:

无序,书上说的

呵呵,古语说的好,尽信书不如无书

你看的书已经过时了,建议以Qt 自带的 Manual 为准:

从Qt4.6开始,Manual中有这句话:

If several slots are connected to one signal, the slots will be executed one after t……

[解决办法]
One signal can be connected to many slots:

connect(slider, SIGNAL(valueChanged(int)),
spinBox, SLOT(setValue(int)));
connect(slider, SIGNAL(valueChanged(int)),
this, SLOT(updateStatusBarIndicator(int)));
When the signal is emitted, the slots are called one after the other, in an unspecified order.

书上说无序
[解决办法]
无序。
[解决办法]
从Q4.6开始,就已经有顺序了,根据你connect的顺序。
[解决办法]
+1
探讨

同一个信号连接的多个槽,调用是无序的

[解决办法]
没有顺序。
[解决办法]
6楼就是权威啊,望楼主采纳

读书人网 >QT开发

热点推荐