Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to add a transition in onEntry in Qtstatemachine
AndreAhmed last edited by
Reading the statemachine in qt docs, they say you can override the onEntry() for each state. My question is how to add transistion inside the onEntry function so that the state machine moves to another state from the onEntry().
If you want to directly go to anther state, you don't need to use onEntry, you can use QState::addTransition with your target state as parameter.
Hope it helps