我正在使用 QProcess
来运行其他程序。但是当我在调用 QProcess.start()
后退出我的应用程序时,它在调试控制台中说:
QProcess: Destroyed while process is still running.
进程结束。
但我想在关闭我的应用程序后继续运行此进程。我如何开始新流程:
QProcess p;
p.start("ssu.exe", QStringList() << "-instantinstall");
我该怎么做?
最佳答案
您需要使用QProcess::startDetached
。查看文档:
If the calling process exits, the detached process will continue to live.
关于qt - QProcess 在调用 QProcess.start() 后退出应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20616846/