[Solved]How to use QProcess to get tty from xterm?
-
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?
-
No ideas for this problem? Anyone?