I use system() command in Qt. and I want to get output and show it to users. my command is:
system("echo '" + rootPass.toAscii() + "' | su - root -c 'yum -y install " + packageName.toAscii() + "'");
this command can't run when I use it in QProcess (start or execute function)
but if i can run this command in QProcess i can get output with QProcess::readAllStandardOutput()
function.
also when i used ">" in system command to save output in a file, I receive output when the package completely installed. like bellow:
system("echo '" + rootPass.toAscii() + "' | su - root -c 'yum -y install " + packageName.toAscii() + "' > result.out");
is there any idea about running this command with QProcess, or get output from system() command as soon as write each line.