You can use Qprocess for this purpose. At the beginning of your Do application
Qprocess p;
p.start("pkill processname1");
p.waitForFinished();
p.start("pkill processname2");
p.waitForFinished();
p.start("pkill processname2");
p.waitForFinished();
Or you can directly use the system call.
system("pkill processname1");
system("pkill processname2");
system("pkill processname3");
In a Windows environment, you can use the following commands to kill a process
process -k "Process ID"
process -k "Process Name"
You can read more here.
source
share