title: Qt 5 and QProcess redirect stdout with signal/slot readyRead
body: <p>This problem is bothering me because it should work, but sadly it does not. 
  What i try to achieve is to read the standard output of a certain process and make another process handle it i.e. print it out.</p>
  
  <p>The process that produces output looks like this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  
  int main() {
      for (int i = 0; i &lt; 100; i++) {
          printf("yes %d\n",i);
          fflush(stdout);
          sleep(1);
      }
      return 0;
  }
  </code></pre>
  
  <p>The process is started in another application like this:</p>
  
  <pre><code>#include &lt;QProcess&gt;
  ...
  QProcess * process = new QProcess;
  SomeClass * someClass = new SomeClass(process);
  connect(process,SIGNAL(readyRead()),someClass,SLOT(onReadyRead()));
  
  process-&gt;start("../Test/Test",QStringList());
  if (!process-&gt;waitForStarted(4000)) {
      qDebug() &lt;&lt; "Process did not start.";
  }
  ...
  void SomeClass::onReadyRead() {
      qDebug() &lt;&lt; "Reading:" &lt;&lt; process-&gt;readAllStdOutput();
  }
  </code></pre>
  
  <p>My expected output would be:</p>
  
  <pre><code>Reading: yes 0
  Reading: yes 1
  ...
  Reading: yes 99
  </code></pre>
  
  <p>However i get no output at all. 
  And when i use QCoreApplication i get all the output but not through the signal/slot but directly in the console.</p>
  
  <p>I dont understand because it works in another application that uses Qt 4.8.</p>
  
  <p>My question is, is anyone experiencing the same problem or does anyone know how i can get the expected behaviour?</p>