QProcess を呼び出して xterm を起動する必要があります。その後、データを送信する必要があります。それらのコードが正しく実行できないのはなぜですか?
QProcess proc;
proc.start("xterm");
proc.waitForStarted();
proc.write("ls\n");
proc.waitForFinished();
proc.waitForBytesWritten();
qDebug()<<proc.readAllStandardOutput();//output: nothing
qDebug()<<proc.errorString();//output: "write error"
ご協力ありがとうございました