Results 1 to 11 of 11

Thread: QStateMachine, not getting entered()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QStateMachine, not getting entered()

    It's an asynchronous call. The machine will start next time Qt enters the event loop.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    jimiq (19th November 2009)

  3. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows Symbian S60
    Thanks
    5

    Default Re: QStateMachine, not getting entered()

    I have no other events running at that time.
    I checked if it was running later in the app and it still comes back with stopped

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QStateMachine, not getting entered()

    As already said, provide a minimal compilable example reproducing the problem. I can't help you without knowing what you did.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows Symbian S60
    Thanks
    5

    Default Re: QStateMachine, not getting entered()

    I managed to find the problem. When you mentioned about it being an asynchronous call got me thinking. I found that I was calling the state machine in the constructor of my dialog and was trying to trigger it too early. I then added a slot/signal combination to wait for the started() signal from the state machine before trying to create the TCP socket and now all appears fine.

    Thanks for your help.
    Jim

Similar Threads

  1. Replies: 28
    Last Post: 7th May 2010, 12:29
  2. QStateMachine
    By piotr.dobrogost in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2009, 08:17
  3. QStateMachine and signals
    By rossm in forum Qt Programming
    Replies: 2
    Last Post: 26th March 2009, 10:43
  4. fetching each char entered in Qtextedit??
    By Shuchi Agrawal in forum Newbie
    Replies: 3
    Last Post: 17th February 2007, 11:07
  5. Record update windowd entered data saving
    By MarkoSan in forum Qt Programming
    Replies: 56
    Last Post: 18th January 2006, 18:50

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
  •  
Qt is a trademark of The Qt Company.