How is it possible to start external child processes with QProcess in a QT Application, and go on with execution of the main program, without waiting for the child process to be finished, but in the same time, get an callback from the child process when he is done?
First Scenario:
QProcess* child = new QProcess();
connect(child, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(isFinished( int, QProcess::ExitStatus )));
child->start( "example.exe", QStringList() << path);
.
.
. further execution of main application
Here the child process is started and the main app goes on with execution,
but although the signal/slot connection is done without any QT errors,
there comes no callback when the child is finished.
Second Scenario:
QProcess* child = new QProcess();
connect(child, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(isFinished( int, QProcess::ExitStatus )));
child->start( "example.exe", QStringList() << path);
child->waitForFinished();
.
.
. NO further execution of main application
Here the child process is started and the main app goes not on with execution,
and the finished callback from signal/slot comes correctly.
Both are not what i want.
Any ideas?