start() ,execute() 存在进程的阻塞, QProcess 对象进程等待干活中的另外一个进程
startDetach() ,使第二个进程自己单独跑创作中心
void SoftWareUpdate::startNewApp()
{
m_label->setText("update complete. start to start the new App...");
// kill
QProcess p;
p.setWorkingDirectory(APP_DIR);
p.start("killall App");
p.waitForStarted(10);
qDebug() << p.state();
// start App
p.waitForFinished();
p.start("cd ./App/"); // start will mute the main process
p.start("chmod 777 App");
p.waitForFinished();
p.start("./App/App");
p.waitForFinished();
qDebug() << "this is the work dir:" <<p.workingDirectory();
p.waitForStarted();
qDebug() << " the start error:" << p.error();
}