title: Open external application and close current application
body: <p>In my gui project, I need to start another application that updates the application that called the initial update.. if that makes sense.</p>
  
  <p>The only way the secondary program can update the main program is if the main program is closed.</p>
  
  <p>This is what I did:</p>
  
  <pre><code>QDesktopServices::openUrl(QUrl("file:update.exe"));
  qApp-&gt;quit();
  </code></pre>
  
  <p>In the update program I also added a 2 second sleep timer before the update begins just in case. The problem is the main program never closes.</p>
  
  <p>I have replaced qApp->quit() with qApp->exit, QApplication::quit(), QCoreApplication::exit() etc and nothing is closing the main program.</p>
  
  <p>Any suggestions?</p>