Results 1 to 3 of 3

Thread: How to get the a web page as a byte stream to save it ?

  1. #1
    Join Date
    Oct 2010
    Posts
    21
    Thanks
    3
    Qt products
    Qt Jambi
    Platforms
    Unix/X11

    Default How to get the a web page as a byte stream to save it ?

    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 ?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to get the a web page as a byte stream to save it ?

    You can use view->page()->mainFrame()->html();
    Or view->page()->networkAccessManager() (connect some slots to the signals)

  3. The following user says thank you to tbscope for this useful post:

    daudiam (13th October 2010)

  4. #3
    Join Date
    Oct 2010
    Posts
    21
    Thanks
    3
    Qt products
    Qt Jambi
    Platforms
    Unix/X11

    Default Re: How to get the a web page as a byte stream to save it ?

    thanks. It worked.

Similar Threads

  1. How can I support page up/page down on QTextEdit
    By wesley in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2010, 20:18
  2. PlEASE HELP: Hot To Use Byte Array, data stream
    By aash_89 in forum Qt Programming
    Replies: 7
    Last Post: 16th July 2010, 09:33
  3. Replies: 3
    Last Post: 19th April 2010, 15:16
  4. Byte shifting in C
    By tntcoda in forum General Programming
    Replies: 3
    Last Post: 14th November 2008, 23:40
  5. QTabWidget remove a page at the page's request
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 29th December 2007, 21:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.