title: QEventLoop proper usage
body: <p>I have doubts how should I use <code>QEventLoop</code>. I have 2 pieces of code, both of them work for me (get web resource downloaded).</p>
  
  <p>First one:   </p>
  
  <pre><code>QNetworkAccessManager *manager = new QNetworkAccessManager( this );
  QNetworkRequest request;
  request.setUrl(QUrl(url));
  request.setRawHeader("User-Agent", "Mozilla Firefox");
  connect(manager, SIGNAL(finished(QNetworkReply*)),this,SLOT(replyFinished(QNetworkReply*)));
  manager-&gt;get( request )  ;
  
  QEventLoop loop;
  connect(manager, SIGNAL(finished(QNetworkReply*)),&amp;loop, SLOT(quit()));
  loop.exec();
  </code></pre>
  
  <p>Second one:</p>
  
  <pre><code>QNetworkAccessManager *manager = new QNetworkAccessManager( this );
  QNetworkRequest request;
  request.setUrl(QUrl(url));
  request.setRawHeader("User-Agent", "Mozilla Firefox");
  manager-&gt;get( request )  ;
  
  QEventLoop loop;
  connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(replyFinished(QNetworkReply*)));
  loop.exec();
  </code></pre>
  
  <p>What I want to know is which one should I use. I mean, does the event loop quit in the second one after signal is emmited? Or do I have to call <code>quit()</code> like in the first one? I found the second solution somewhere but it didn't seem proper to me so I modified it into first piece of code.</p>