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");
精彩评论