title: get all running processes info using QProcess
body: <p>few days ago i asked about how to get all running processes in the system using QProcess.
  i found a command line that can output all processes to a file:</p>
  
  <p>C:\WINDOWS\system32\wbem\wmic.exe" /OUTPUT:C:\ProcessList.txt PROCESS get Caption</p>
  
  <p>this will create C:\ProcessList.txt file contains all running processes in the system.
  i wonder how can i run it using QProcess and take its output to a variable.</p>
  
  <p>it seems every time i try to run it and read nothing happens:</p>
  
  <pre><code>QString program = "C:\\WINDOWS\\system32\\wbem\\wmic.exe";
  QStringList arguments;
  arguments &lt;&lt; "/OUTPUT:C:\\ProcessList.txt" &lt;&lt;"PROCESS"&lt;&lt; "get"&lt;&lt; "Caption";
  
  process-&gt;setStandardOutputFile("process.txt");
  process-&gt;start(program,arguments);
  
  QByteArray result = process-&gt;readAll();
  </code></pre>
  
  <p>i prefer not to create process.txt at all and to take all the output to a variable...</p>