Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Changing target state or transitions while state machine is running



  • I know you cannot remove states while the state machine is running, but is it possible to change transitions or their target states while the machine is running? I want to change a transition from a state based on an evaluation determined when that state is entered.


  • Lifetime Qt Champion

    Hi,

    Sounds you should rather implement a custom transition.



  • Right now that is what I am doing. I make an evaluation to determine whether I need to transition and then set a target state in the eventTest based on whether I need to transition and the outcome of the evaluation. I do not want to have multiple transitions handling this as I do not want to have to make the evaluation multiple times for each outcome.


  • Lifetime Qt Champion

    Can you describe what a bit more your machine ? e.g. a step by step run with this transition involved.


Log in to reply