I am trying to call a method in python when entering states using Qt’s state machine framework. I am able to set up the state machine and edit GUI properties, but not call methods I have written. Is there a way to do this?
Keep in mind that I am new to both Qt and Python so an example or detailed explanation would be greatly appreciated!
One the best reasons for using the Qt toolkit is its superb documentation. Although it’s written primarily for the C++ language, you hardly need to know C++ at all to be able to use it.
So I would suggest you start by looking through The State Machine Framework overview.
For PySide example code (which is ported from Qt’s C++ examples), take a look at the pyside-examples repository. The
animation,hyper-uiandstate-machinedirectories all contain several demo applications which use the state machine framework.