title: How can I read content (http response body) from a QNetworkReply
body: <p>I'm using qt5.3 and I googled a lot before I post.</p>
  
  <p>I want to read data from <code>QNetworkReply</code>. I have a <code>QWebView</code> and I also need the http response to be read by <code>QWebView</code> to display the webpage. What I need is just to log the web content or whatever response to http posts.</p>
  
  <p>The problem is <code>QNetworkReply</code> is something that can only be read once.</p>
  
  <ol>
  <li><p>If I call <code>readAll()</code> when I pick <code>readyRead()</code> signal, I will get the full data. But it will be cleared so <code>QWebView</code> displays nothing (it won't get any reply data).</p></li>
  <li><p>Or if I pick <code>finished()</code> signal, since the data is already read by <code>QWebView</code> (or <code>QNetworkAccessManager</code>), I get nothing if I call <code>readAll()</code> here. Is there somewhere that <code>QNetworkReply</code>, or manager or any class, stores the data which I can still read?</p></li>
  </ol>
  
  <p>In #1 I can get part of the data if I call <code>peek()</code>. This function does not clear the response data. But it won't work if the response body is big. The <code>QNetworkReply</code> is a sequential thing that I can neither know its data nor read further than buffered.</p>
  
  <p>I have no idea of how to do with this.....</p>
  
  <p>I just want to monitor and log the request and response body of any request made on my <code>QWebView</code> ...</p>
  
  <p>Edit: note that my data to read from response is as large as 1MB so it won't be ok to peek the whole data without further reading.</p>