开发者

launch GUI app from QProcess

I want to launch GUI app using QProcess.

process.start() return immediately without showing GUI app window.

I also tried CONFIG += 开发者_运维问答console .It didn't work.

QProcess process;
process.setEnvironment(QProcess::systemEnvironment());
process.start("pkexec --user root ",QStringList()<<QString("apt-get install xyz"));
process.waitForFinished();
process.close();


Try

process.start("pkexec", QStringList() << "--user" << "root" << "apt-get" << "install" << "xyz");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜