readyAllStandardOutput doesn't return anything



  • Hi ,
    im trying to run plink.exe and get its output .
    as you know when you first try to connect to a remote computer for the first time you'll get a warning that says this remote pc's key isn't recognized do you trust y/n .......
    when I try to read this output using :

          process->waitForreadyRead();
          output = process->readAllStandardOutput();
    

    i don't get anything , see this picture.
    the output is empty .
    but if i continue and press y , and after the connection is successful , then use the above code to read , i get the output of the session only , meaning this part only output .
    how can i also read the output of plink in the first picture ?
    thanks
    to further explain the problem this is the "complete code" :

    process->start("plink.exe",input_list,QIODevice::ReadWrite);
    process->waitForStarted();
    process->waitForReadyRead();
    Qstring output = process->readAllStandardOutput();
    "analyze output and check what the program is asking if decided to continue then"
    process->write("y\n");
    process->waitForFinished();
    output = process->readAllStandardOutput();
    Qmessagebox::information(this,"info",output);
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.