I have gone through Qt Docs.
there its mentioned waitForFinished() should used for NON GUI. How to achieve the same in GUI
Apps.
I have gone through Qt Docs.
there its mentioned waitForFinished() should used for NON GUI. How to achieve the same in GUI
Apps.
Thanks,
Rajesh.S
Make a QEventLoop, connect the finished() signal of the QProcess to the quit() slot of the QEventloop, execute the QProcess, and immediately the QEventLoop. This technique will block until your process is really finished.
As far as I know when you run an application as detatched, you won't receive a finished signal.
I tried mapping finished() signal with qeventquit() slot, its stopping the execution but again its not starting even if the process finished.
Thanks,
Rajesh.S
Notice that QProcess::startDetached() is a static method. Calling non-static methods have no effect on a detached process.
Last edited by wysota; 2nd June 2008 at 15:22. Reason: spelling error
J-P Nurmi
how to achieve my requirement any suggestion Please ?
Thanks,
Rajesh.S
Don't start the process as detached. If it doesn't work, it's because you made some mistake.
Sorry , I made mistake in start,
Previously I used
Wrong Code:
Qt Code:
process->start("cmd.exe /C ant -buildfile fileName");To copy to clipboard, switch view to plain text mode
to start the cmd process.
This is wrong,
Now i am using
Correct Code:
Qt Code:
process->start("cmd /C ant -buildfile fileName") ;To copy to clipboard, switch view to plain text mode
Now this is working.
Thank u for ur continuous help.
Thanks,
Rajesh.S
Bookmarks