PDA

View Full Version : Programmatically Save Image rendered in a QWebPage



last2kn0
23rd November 2008, 22:28
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!

last2kn0
24th November 2008, 06:33
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.