Results 1 to 2 of 2

Thread: Parallel states question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2012
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Parallel states question

    I created a state machine that has an initial state that transitions into a group state. Inside the group state, I have 2 parallel states. One of these parallel states has a transition to itself. The other has no transitions other than the entry.

    When I send a signal to make the 1st paralllel state transition to itself, I notice that the second parallel state also transitions to itself even though no transition is defined.

    How do I stop this? Is it possible?

    I have attached my test code: main.cpp, stateMachine.h, statemachine.cpp and here is the output:

    $ ./stateMachineTest
    enteringInit
    emitting evUSBConnection
    leavingInit
    entering the waiting state
    entering the waitingForMsg state.
    enteringWaitingForCmd
    timer fired: generating evMsg
    leavingWaitingForCmd
    leaving the waitingForMsg state
    enteringWaitingForCmd
    entering the waitingForMsg state.
    count = 2 - quitting
    leavingWaitingForCmd
    leaving the waitingForMsg state
    leaving the waiting state
    entering the finished state
    Attached Files Attached Files

Similar Threads

  1. QML animations based on states
    By mvbhavsar in forum Newbie
    Replies: 4
    Last Post: 3rd September 2014, 09:54
  2. QPushButton with two states and colours
    By hildebrand in forum Newbie
    Replies: 3
    Last Post: 5th June 2013, 08:22
  3. Replies: 2
    Last Post: 25th February 2013, 13:32
  4. Problem with QAbstractSocket and states.
    By nomadscarecrow in forum Qt Programming
    Replies: 0
    Last Post: 17th March 2010, 15:55
  5. setIcon() - different QIcon states?
    By AaronMK in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2008, 03:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.