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. QProcess::readyReadStandardOutput() signal not emitting
Forum Updated to NodeBB v4.3 + New Features

QProcess::readyReadStandardOutput() signal not emitting

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.5k 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.
  • C Offline
    C Offline
    carlyh
    wrote on last edited by carlyh
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Did you also check that it started properly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • C Offline
        C Offline
        carlyh
        wrote on last edited by
        #3

        @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!

        aha_1980A 1 Reply Last reply
        0
        • C carlyh

          @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!

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          1

          • Login

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