Simplest code:
void test
{
QProcess p;
p.start("sleep 10");
p.waitForBytesWritten();
p.waitForFinished(1);
}
Of course, the process can't be finished before the end of the function, so it displays a warning message:
QProcess: Destroyed while process ("sleep") is still running.
I want this message not to be shown - I should destroy the process by myself before end of function, but I can't find how to do this correctly: p.~QProcess(), p.terminate(), p.kill() can't help me.
NOTE: I don't want wait for process execution, just kill it when its running, by myself.