PDA

View Full Version : Invoking another application



Qting
4th February 2012, 06:27
I am creating an application which needs to invoke a different second application. I need that this invoked application does not die when the first application is closed. Is there a way ?

wysota
4th February 2012, 11:43
QProcess::startDetached()

Qting
5th February 2012, 16:02
QProcess::startDetached()

@wysota Thanks for the reply. I am trying to control a console application from a GUI application. Seems QProcess::StartDetached() would start the application but QProcess::Terminate() is causing Panic in the controlling application. Is there any way to close the console application from the GUI application ?

wysota
5th February 2012, 21:03
startDetached() is a static call, what do you want to call terminate() on?

Qting
6th February 2012, 16:25
I am sorry, I got confused..

The whole process that I want is:
1. User starts the GUI app
2. Through the GUI app, he starts the console app
3. The GUI app then may be closed
4. To close the console app, User starts the GUI app which would provide the interface
So, the startdetached() call could start the console app, I need some way to close the console app through the GUI app.

wysota
6th February 2012, 16:35
No, you need a way to communicate with the console app. You can do that with some IPC mechanism.