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 :
proc->startDetached("cmd.exe","ant -buildFile build.xml","D:/anttest");
proc->waitForFinished();
QMessageBox::information(this,
"Success",
"ant Success",
"OK");
proc->startDetached("cmd.exe","ant -buildFile build.xml","D:/anttest");
proc->waitForFinished();
QMessageBox::information(this,"Success","ant Success","OK");
To copy to clipboard, switch view to plain text mode
Bookmarks