Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]How to use QProcess to get tty from xterm?

[Solved]How to use QProcess to get tty from xterm?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saki
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Saki
      wrote on last edited by
      #2

      No ideas for this problem? Anyone?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved