Reputation: 717
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?
Upvotes: 0
Views: 958
Reputation: 1965
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();
}
Upvotes: 1