I sarts xterm from my program by using QProcess.
I need to send to xterm "tty" command and reads its output.
I try to do it a such way
Qt Code:
  1. terminalProc.start("xterm");
  2. terminalProc.setReadChannel(QProcess::StandardOutput);
  3.  
  4. terminalProc.waitForStarted(-1);
  5. terminalProc.write("tty\n");
  6. QByteArray result = terminalProc.readAllStandardOutput();
To copy to clipboard, switch view to plain text mode 

But result is empty. What i am doing wrong?
Is there any other way to get value of tty?