title: Making an HTTP GET under Qt
body: <p>I have kind of a n00b problem, I can't seem to make HTTP GET requests from my Qt Code...</p>
  
  <p>Here is the code supposed to work:</p>
  
  <pre><code>void MainWindow::requestShowPage(){
      QNetworkAccessManager *manager = new QNetworkAccessManager(this);
      connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(requestReceived(QNetworkReply*)));
  manager-&gt;get(QNetworkRequest(QUrl("http://google.com")));
  }
  
  void MainWindow::requestReceived(QNetworkReply* reply){
      QString replyText;
      replyText.fromAscii(reply-&gt;readAll());
  
      ui-&gt;txt_debug-&gt;appendPlainText(replyText);
  }
  </code></pre>
  
  <p>But the problem is that this just doesn't work: In <code>requestReceived(QNetworkReply* reply)</code>, <code>replyText</code> seems empty, <code>reply-&gt;error()</code> returns <code>0</code> and <code>reply-&gt;errorString()</code> returns "Unknown Error". I don't really know what to do right now...</p>
  
  <p>Any idea?</p>