[Qt-interest] Qt state machine: problem while queuing multiple events
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Wed Jun 22 15:35:45 CEST 2011
> Use two different events to trigger the "back" transitions. That is have a
> backToS2 event and a backToS1 event. Then only post the correct event
> depending upon what state you are in when the keypresses arrive.
I already have 2 different transitions. The problem is both of them
react to _same_ event, i.e the 'back' event here.
So when I was in S3, I processed 2 keypress events (i.e for key
3)....and my SM event translator changed it to 'back' (since it got 3
when in S3) and posted it to the machine.
Now when the SM ran next (I don't when that is though), it sees TWO
'back' events queued. Hence, even though the transitions are different
the transition still happens.
Or were you suggesting posting different events altogether based on
what my current state is? (that'll get messy in my real SM that has
many such states/transitions).
Thanks,
-mandeep
>
> Sean
>
>
More information about the Qt-interest-old
mailing list