[Solved]How to use QProcess to get tty from xterm?
General and Desktop
2
Posts
1
Posters
1.7k
Views
1
Watching
-
Hi,
I'm now trying to get a tty from xterm and I used this:@QProcess *proc=new QProcess(this);
proc->start("xterm");
proc->waitForStarted(-1);
proc->write(qPrintable("tty\r\n"));
proc->waitForReadyRead();
qDebug()<<QString(proc->readAllStandardOutput());
qDebug()<<proc->readAllStandardOutput();@But it just popup a xterm window. Nothing input nothing output, and the program was stuck. Anyone has idea to solve this problem?