[Qt-interest] It works...not sure how (QT state machine object ownership) :)
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Sat May 29 11:05:06 CEST 2010
Hi All,
I have a state machine which uses custom states and transitions. These
states and transitions are created in me app which are then added to
the stat machine. My app class is the parent (in the QObject
hierarchy) of the QStateMachine instance.
Everything works fine and when my my app exits, I see the destructors
of my custom states and transitions being called.
My confusion arises from the fact that neither the custom states nor
the transitions are children of my app class (in the QObject
heirarchy) but still the object cleanup happens properly on exit.
Is it that the QStateMachine class is responsible for cleaning up all
the states/transitions attached to it?
Since my app's destructor will be calling QStateMachine's destructor,
I'm guessing the QSM will be further doing the state/transtion
cleanup. Is it so?
Thanks,
-mandeep
More information about the Qt-interest-old
mailing list