导航:首页 > 编程语言 > qt关闭应用程序

qt关闭应用程序

发布时间:2023-09-14 08:46:14

A. QT 启动与关闭外部程序

启动

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();

阅读全文

与qt关闭应用程序相关的资料

热点内容
手机如何删除删除不了的app 浏览:212
编程怎么走好路 浏览:417
小米游戏数据一般在哪个文件 浏览:902
桌面服务器是哪个文件 浏览:965
二进制数据类型的长度为什么是n4 浏览:561
js获取当前js文件的路径 浏览:106
adobeindesigncs6教程 浏览:909
猿编程怎么玩游戏 浏览:603
win8无网络访问权限 浏览:121
一个数据库大小限制多少g 浏览:760
无限斯特拉托斯可以用哪些app看 浏览:954
图片与拍摄文件大小名词解释 浏览:229
java的classpath配置文件 浏览:286
在小年鱼app里面如何退款 浏览:143
网络电话哪个软件好用吗 浏览:386
pokemon叫声文件 浏览:689
工程源文件路径 浏览:137
cad高版本能否打开低版本文件 浏览:430
金山1kb病毒专杀工具 浏览:371
面试官大数据处理需要问什么问题 浏览:842

友情链接