QT信号连接的槽函数是否有调用的顺序
如题,信号先后连接两个槽函数,是否先调用第一个,之后调用第二个,是否有谁能给个权威一点的答案,谢谢
[解决办法]
同一个信号连接的多个槽,调用是无序的
[解决办法]
没有明确顺序。
[解决办法]
[Quote=引用:]
没有明确顺序。
[/Quote]
+1
[解决办法]
无序,书上说的
[解决办法]
你就当他们是一起并行运行的, 谢谢
[解决办法]
[解决办法]
[解决办法]
[解决办法]
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楼就是权威啊,望楼主采纳