Results 1 to 2 of 2

Thread: Programmatically Save Image rendered in a QWebPage

  1. #1
    Join Date
    Oct 2007
    Location
    USA
    Posts
    27
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Programmatically Save Image rendered in a QWebPage

    I am currently using a QWebPage to show a website which contains images that are inserted by a randomized PHP function. What this means is, I can't get a direct link to the images. Any access I have must be through the rendered QWebPage.

    Is there some way for me to select and save this image programatically? I've been spacing out about a solution to this. I would greatly appreciate the help.

    Thanks!

  2. #2
    Join Date
    Oct 2007
    Location
    USA
    Posts
    27
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Programmatically Save Image rendered in a QWebPage

    I have found a solution to this problem. QWebFrame has a function called hitTestContent(QPoint). When given a QPoint it returns a QWebHitTestResult which provides info about the area that was just hit. If there is an image at that location it has a method called pixmap() which returns the QPixmap of that image.

    If you have any further questions about this, please do ask and I will explain further.

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.