title: Qt getting network requests with QNetworkReply that download data to temp file
body: <p>I am having some issues reading an online file. I'm trying to read what is in the file after it gets downloaded to a temporary file. Here is my code:</p>
  
  <pre><code>void MainWindow::fileIsReady( QNetworkReply * reply)
  {
      QTemporaryFile tmpFile;
      tmpFile.write(reply-&gt;readAll());
  
      QByteArray asdf = reply-&gt;readAll();
      qDebug() (QString("%1").arg(asdf.length())); // returns 0
  
      if (tmpFile.open())
      {
          qDebug &lt;&lt; "attempting to read file";
  
          QTextStream stream(&amp;tmpFile);
          QString value = stream.readAll();
          qDebug &lt;&lt; value; // value is returning nothing
      }
      else
      {
          qDebug() &lt;&lt; "failed to open internet file";
      }
  }
  
  // in MainWindow constructor (MainWindow::MainWindow)...
  
  
  QNetworkAccessManager * manager = new QNetworkAccessManager(this);
  connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileIsReady(QNetworkReply*)) );
  manager-&gt;get(QNetworkRequest(QUrl("https://www.website.com/stuff/file.exe.md5")));
  </code></pre>
  
  <p>I'm going to be using this to compare two md5 strings.</p>