Results 1 to 11 of 11

Thread: system() function and QProgressBar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: system() function and QProgressBar

    I tried QProcess and startDetached("cmd.exe","ant -buildFile FileName")

    to start the process. Its working , but its running the script seperately, and next satement to

    the QProcess is executing before the completion of the process started.

    even i tried start instead of startDetached , start is not working for cmd.exe.

    I tried to call waitForFinished() next to startDetached() method then also its executing next

    statement before finishing the process, how to stop the execution until the process

    completes.

    My Code :

    Qt Code:
    1. proc->startDetached("cmd.exe","ant -buildFile build.xml","D:/anttest");
    2.  
    3. proc->waitForFinished();
    4.  
    5. QMessageBox::information(this,"Success","ant Success","OK");
    To copy to clipboard, switch view to plain text mode 
    Last edited by rajeshs; 2nd June 2008 at 07:43. Reason: alligned properly
    Thanks,
    Rajesh.S

Tags for this Thread

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.