[英]QStateMachine addTransition for signals with params
What is the best and short way to inplace addTransition on signal with params (c++/c++11): 使用params(c ++ / c ++ 11)在信号上使用addTransition的最佳和简短方法是什么?
QCheckBox checkBox;
QStateMachine machine;
QState *s1 = new QState();
QFinalState *s2 = new QFinalState();
s1->addTransition(&checkbox, SIGNAL(stateChanged(int state)), s2);
The answer is that there is nothing more that has to be done : the code that I included in the question worked. 答案是没有什么必须做的 :我在问题中包含的代码有效。 State transition is triggered by any signal included the signals with parameters.
状态转换由包含带参数的信号的任何信号触发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.