I am starting a new process from my application using QProcess::startDetached(). After this new process is started, I want my application to exit. How do I do that?
Asked
Active
Viewed 802 times
0
-
@N1ghtLight. A little more detail. I am building on **Mac**. After the new process gets started, my application's window disappeares but remains docked in the dock. I want the application to be fully closed. – user2653062 Oct 15 '14 at 21:11
2 Answers
1
Keep in mind, that calling QProcess::startDetached()
doesn't mean that new process is started. You should check returned value of this method:
bool isStarted = QProcess::startDetached(commandString);
if(isStarted)
{
qApp->quit();
}

trivelt
- 1,913
- 3
- 22
- 44