title: How to check if a program exists in path using Qt?
body: <p>I have this code:</p>
  
  <pre><code>QProcess* proceso = new QProcess();
  QString programa = "unknow -v";
  proceso-&gt;start(programa);
  proceso-&gt;waitForFinished();
  
  QString normal = proceso-&gt;readAllStandardOutput();
  QString errores = proceso-&gt;readAllStandardError();
  
  qDebug() &lt;&lt; normal;
  qDebug() &lt;&lt; errores;
  </code></pre>
  
  <p>The output I get is:</p>
  
  <blockquote>
    <p>""
    ""</p>
  </blockquote>
  
  <p>But I want get and error that says: Command not found.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDITED:</p>
  
  <p>I found this solution using Qt:</p>
  
  <pre><code> int result = system("unknow -v");
   if(result!=0) {
     qDebug() &lt;&lt; "No está instalado nasm";
   } else {
     qDebug() &lt;&lt; "Está instalado.";
   }
  </code></pre>
  
  <p>But I want get an output into a QString.</p>