使用Qprocess的startDetached()方法,當前程序關閉時,調用的外部程序能夠照常運行。
QProcess::startDetached(
"C:\\Qt\\1.exe"
,QStringList());
記得在頭文件中添加
#include <QProcess>,不然編譯不通過