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

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -