Well, you have to use start(), not execute(). Then either use the signal or wait till execution is finished, but that will block your ui. But since uname is fast, that shouldn't be a problem. Also please use the [code]-tags!
proc.waitForFinished();
QString command
(proc.
readAllStandardOutput());
command = command.trimmed();
qWarning() << command;
QProcess proc;
proc.start("uname", QStringList() << "-s");
proc.waitForFinished();
QString command(proc.readAllStandardOutput());
command = command.trimmed();
qWarning() << command;
To copy to clipboard, switch view to plain text mode
Bookmarks