PDA

View Full Version : How to get the a web page as a byte stream to save it ?



daudiam
13th October 2010, 15:14
I am loading a web page through webview's load() function and want to save the page. For that I will need the byte stream of that page. How to get that. QNetworkReply can be used, I think. Through its readAll function, I can get the page as a byte stream. But how can I get a QNetworkReply object when I am loading the page through Webview ? Is there any other way to save that web page ?

tbscope
13th October 2010, 15:25
You can use view->page()->mainFrame()->html();
Or view->page()->networkAccessManager() (connect some slots to the signals)

daudiam
13th October 2010, 16:33
thanks. It worked.