当前位置: 移动技术网 > IT编程>开发语言>C/C++ > QT 启动shell脚本

QT 启动shell脚本

2018年07月17日  | 移动技术网IT编程  | 我要评论

冬虫夏草花,nade-681,尧璇

1、QProcess *p = new QProcess(this);

2、QString str = qApp->applicationDirPath() + "/update.sh";//这是我的shell脚本的目录

3、if(p->startDetached(str))

{

  qDebug() << "success";

}else

{

  qDebug() << "fail";

}

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网