qprocess not triggering readyReadStandardOutput()

28 Views Asked by At

hello im having an issue with qprocess readyReadStandardOutput, it doesnt get triggered until i call process->closeWriteChannel();

im starting my process like this

 process = new QProcess();
    connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(response_adb()));
    process->setProcessChannelMode(QProcess::MergedChannels);

    process->setProgram("cmd.exe");
    process->setNativeArguments("/c adb.exe shell\r\n");


    process->start();

    process->waitForStarted();
    process->waitForReadyRead();

and response_adb() is like this

void adbexe::response_adb()
{
    
        QString text2 = process->readAllStandardOutput();
        

        logbox->append(text2);
}

response_adb() never gets called until i call my close function that is like this

void adbexe::close_adb(){

    process->closeWriteChannel();
    process->waitForFinished();
}
0

There are 0 best solutions below