title: Use signals and slots in console application?
body: <p>In my project, I need to download a 1.5MB file from a server. I was able to achieve this in my GUI application like this:</p>
  
  <pre><code>QNetworkAccessManager* m_NetworkMngr = new QNetworkAccessManager(this);
      QNetworkReply *reply = m_NetworkMngr-&gt;get(QNetworkRequest(QUrl("someurl.com")));
      QEventLoop loop;
      connect(reply, SIGNAL(finished()), &amp;loop, SLOT(quit()));
      loop.exec();
      QUrl aUrl("someurl.com");
      QFileInfo fileInfo=aUrl.path();
  
      QFile file(aPathInClient+"\\"+fileInfo.fileName());//aPathInClient is predefined
      file.open(QIODevice::WriteOnly);
      file.write(reply-&gt;readAll());
      delete reply;
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <p>'connect' function does not take four arguments.</p>
  
  <p>How can I modify the signals and slots to work in my console application?</p>