
QString filepath = QDir::currentPath()
QString fullpath = filepath+"\\pp\\dist\\start"
QString title = fullpath+"\\main.exe"
title = title.replace("/","\\")
fullpath = fullpath.replace("/","\\")
QProcess p(this)
p.setWorkingDirectory(fullpath)
p.start("cmd", QStringList()<<"/c"<<"start main.exe")
p.waitForStarted()
p.waitForFinished()
关闭
QProcess p(this)
p.setWorkingDirectory(fullpath)
p.start("cmd", QStringList()<<"/c"<<"taskkill /f /t /im main.exe")
p.waitForStarted()
p.waitForFinished()
在编辑器中输入相应的代码即可关闭。win11关闭外部编辑器方法:1.首先纯粹的打开外部应用程序,找到编辑器。2.其次在编辑器中输入相应的代码。3.最后按回车退出外部应用程序即可关闭外部编辑器。
Windows11,是由微软公司(Microsoft)开发的 *** 作系统,应用于计算机和平板电脑等设备。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)