[Qt-interest] Listing all States belonging to a QStateMachine
Sean Harmer
sean.harmer at maps-technology.com
Tue Aug 17 18:29:46 CEST 2010
Hi,
On 17/08/2010 10:37, Liebe Markus (RtP2/TEF72) wrote:
> Is it possible to somehow list all states that belong to a given QStateMachine?
> I was hoping that QStateMachine::configuration() would do sth. like that, but it seems to me that that is not the case.
>
> I want to draw a chart of the statemachine using graphviz and all the information that I need is already in the QStateMachine.
QStateMachine, QAbstractState, and QAbstractTransition are all derived
from QObject so you can simply use the parent-child functions such as
QObject::children() to traverse the hierarchy of states and transitions.
HTH,
Sean
More information about the Qt-interest-old
mailing list