title: Qt - Wait for Qprocess to finish
body: <p>I'm using CMD by <code>QProcess</code> but I have a problem.</p>
  
  <p>My code:</p>
  
  <pre><code>QProcess process;
  process.start("cmd.exe");
  process.write ("del f:\\b.txt\n\r");
  process.waitForFinished();
  process.close();
  </code></pre>
  
  <p>When I don't pass an argument for <code>waitForFinished()</code> it waits for 30 secs. I want to terminate <code>QProcess</code> after CMD command is executed! Not much and not less!</p>