Removing QStates from a QState
Solved
General and Desktop
-
I have a need when using QStateMachine to dynamically create a number of identical substates to represent a looping action. I do this by creating a list of states and setting up their transitions when I am in the onEntry event in the QState. When I exit the state via onExit I delete the states I created. These dynamic states are transitioned to and from via permenant states in the QState
Is this safe to do? I know QStateMachine has a removeState method, and the documentation states to try to avoid doing this while the machine is running, but is this only for top level states? Is deleting the QStates safe?
-
Hi,
Can you explain why that looping action needs these "dynamic states" ?