I fail to find any example or hint how too organize raw data streaming loading from HTTP. This means that you are able to access to already received data before the transfer is completed. The found samples of asynchronous call through QNetworkAccessManager give ability to do some other tasks asynchronously, but all they waiting for signal “finished” and then read all bunch of data from QnetworkReply using readAll method.

This general question comes from my more practical task to quickly get some data from a huge XML using SAX (not storing all XML in memory). I tried to do it that way:
Qt Code:
  1. // get and parse XML:
  2. reader.setContentHandler(this);
  3. reader.setErrorHandler(this);
  4. QIODevice* src = (QIODevice*) m_manager.get( QNetworkRequest(url) );
  5. QXmlInputSource xmlsource(src);
  6. reader.parse(&xmlsource, true);
To copy to clipboard, switch view to plain text mode 
But after startDocument() in my handler was called it then called error handled with fatal error – unexpected end of document.