c++ - Qt state machine : How to set guard on initial state? -
from qt state machine documentation, can set, in main state, initial substate.
qstatemachine machine; qstate *s1 = new qstate(); machine.addstate(s1); machine.setinitialstate(s1);
i can add guard transition between different states.
but how can add guard on initial state.
qstate *s1 = new qstate(); qstate *s2 = new qstate(); machine.addstate(s1); machine.addstate(s2); machine.setinitialstate(s1, ifblabla_istrue); machine.setinitialstate(s2, ifblabla_isfalse);
Comments
Post a Comment