Wait until the QNetworkReply::finished() or QNetworkAccessManager::finished() signal is emitted and then call readAll(). If you are still using QHttp then you can work out the equivalent for yourself.

If your file is large, or you don't know its size, then trying to hold the whole thing in memory might be a mistake.