Results 1 to 2 of 2

Thread: How to wait for a process that may not have started yet?

  1. #1
    Join Date
    Sep 2013
    Posts
    1
    Qt products
    Qt3

    Default How to wait for a process that may not have started yet?

    Hello,

    I am using Qt3, and am still new to Qt.

    I start Process # 1 and have connected its processExited to firing up Process # 2, and connected its processExited to firing up Process # 3.

    So, in effect, the three processes are daisy-chained together.

    I want to wait until Process # 3 is completed, and then carry on with the remainder of the main program.

    What is the best way to do this, considering that when I am starting Process # 1, I have no certainty when - or if - Process # 3 will start.


    Thanks,
    Nadeem

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

    Default Re: How to wait for a process that may not have started yet?

    It should be enough to connect to the processExited signal of process 3, however bear in mind that any of the previous process might have failed and Process #3 might not have accomplished its task. It is better to connect a implement some kind of state machine that will do all the checks for you and will emit proper signals. Then you can connect to an appropriate signal of the state machine object to be sure that your slot fires only when all three processes had been successful.
    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.


Similar Threads

  1. Kill a Process started with Qprocess ??
    By jesse_mark in forum Newbie
    Replies: 9
    Last Post: 29th November 2012, 23:38
  2. Replies: 5
    Last Post: 15th December 2011, 00:06
  3. The process could not be started! Error
    By jujose in forum Installation and Deployment
    Replies: 3
    Last Post: 27th February 2010, 17:25
  4. Qt Creator: The process could not be started!
    By AlphaWolf in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2009, 03:31
  5. Replies: 2
    Last Post: 30th March 2007, 08: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
  •  
Qt is a trademark of The Qt Company.