title: Piping (or command chaining) with QProcess
body: <p>I'm using Qt and bash over it, need to execute something like:</p>
  
  <pre><code>bash: cat file | grep string
  </code></pre>
  
  <p>in Qt:</p>
  
  <pre><code>QString cmd = "cat file | grep string";
  QProcess *process = new QProcess;
  process-&gt;start(cmd);
  process-&gt;waitForBytesWritten();
  process-&gt;waitForFinished();
  qDebug() &lt;&lt; process-&gt;readAll();
  </code></pre>
  
  <p>The problem is in pipe ("|"), and process returs nothing. If there is no ("|"), like </p>
  
  <pre><code>"cat file" 
  </code></pre>
  
  <p>everything is ok.
  I tried smth. like </p>
  
  <pre><code>"cat file \\| grep string", 
  "cat file \| grep string" 
  </code></pre>
  
  <p>but result is the same. If I copy the command and run it in bash everything is ok. </p>
  
  <pre><code>QString::toAscii().data()
  </code></pre>
  
  <p>and other transforms also have bad result. </p>