Important: Please read the Qt Code of Conduct -

QProcess::readyReadStandardOutput() signal not emitting

  • OS: Windows 10
    Qt versions: attempted on 5.11.1 and 5.12.3

    I'm trying to output logging from a QProcess, but the readyReadStandard() signal doesn't seem to be emitting. The application I'm launching via QProcess starts up fine.

    QProcess *appProcess = new QProcess(this);
    connect(appProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readStdOut()));
    appProcess->setWorkingDirectory(<path to app>);
    appProcess->start(app, arguments);
    void readStdOut()
        qDebug() << "standard output is ready!";

    I've tried using readyReadError() and trying different options of setProcessChannelMode(), with no luck. I'm seeing this with Qt 5.11.1 and 5.12.3. Anyone else run into this issue?

  • Lifetime Qt Champion


    As silly as it may sound: are you sure the application you are calling produces outputs ?

    Did you also check that it started properly ?

  • @SGaist Not silly, I did check that! It it indeed producing outputs.

    And yes, I've tried connecting the QProcess::started signal in the same manner and it gets emitted as expected!

  • Lifetime Qt Champion

    @carlyh said in QProcess::readyReadStandardOutput() signal not emitting:

    Not silly, I did check that! It it indeed producing outputs.

    And are you sure these are stdout outputs?

    Also, check the return value of your connect call, or convert the connect to Qt5 functor style.

    If that all doesn't help, show your complete source please.


Log in to reply