Hello! I posted my issue on stackoverflow: http://stackoverflow.com/questions/2...93521_27736976
I have no idea how to run other application in background from main application. Every time main application is quitting, applications started by it are closed too.
I have tried to use Q_DESTRUCTOR_FUNCTION to run process after main() is processing, without result. I also tried a lot of function:
void closeApp()
{
if(test.startDetached("cmd.exe &"))
qDebug() << "Running";
system("start cmd.exe &");
system("cmd.exe &");
execl("start cmd.exe", "ls", "-r", "-t", "-l", (char *) 0);
system("cmd.exe");
FILE* pd = popen("cmd.exe &", "r");
}
Q_DESTRUCTOR_FUNCTION(closeApp)
void closeApp()
{
QProcess test;
if(test.startDetached("cmd.exe &"))
qDebug() << "Running";
QProcess::execute("cmd.exe");
system("start cmd.exe &");
system("cmd.exe &");
execl("start cmd.exe", "ls", "-r", "-t", "-l", (char *) 0);
system("cmd.exe");
FILE* pd = popen("cmd.exe &", "r");
}
Q_DESTRUCTOR_FUNCTION(closeApp)
To copy to clipboard, switch view to plain text mode
Is it possible to launch and keep process by running from main application?
edit: ok, the problem was debugger .. outside it all works great with simple QProcess::startDetached("xxx");
Bookmarks