[Qt-interest] Debugging Qt StateMachine

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Thu Sep 8 15:27:38 CEST 2011


> So far, I haven't found anything helpful in the state machine framework. Of
> course, I could connect to the entered() signals of all states, but I
> haven't figured out a way I could determine which state sent me the signal.

You can extend the QState (or QAbstractState) class to implement the
onEntry()/onExit to log whenever  that state is entered/exited.

Similarly, you could put logs in your transitions onTransition()
callback to log whenever that transition is triggered by the SM.

HTH,
-mandeep



More information about the Qt-interest-old mailing list