[Qt-interest] unable to use more than 1 transition added to a state (QT StateMachine Framework)

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Tue Mar 16 15:09:03 CET 2010


Hi All,

I'm implementing my FSM which reacts to User QEvents (event type >
QEvent::User). An external app does postEvent(QEvent) to the state
machine.

As part of that I'm implementing my own custom transition which
extends QtAbstractTransition and reimplements the eventTest() method
as shown here:

http://doc.qt.nokia.com/4.6/statemachine-api.html#events-transitions-and-guards

However, if I add more than one such transition to my state (say to
S3) then the statemachine is unable to find any transition and remains
stuck at S3. I've seen the code in example/eventtransitions where they
add TWO QEventTransition's to a state and it seems to be working fine.
I have set valid target states to these transitions.

Note that if add only ONE transition, then it works fine, as in on the
correct event I transition to the next state.

Any clues as howto further debug this issue?

thanks,
-mandeep



More information about the Qt-interest-old mailing list