[webkit-qt] how to get the image's size when i click on an image
Benjamin Poulain
benjamin.poulain at nokia.com
Thu Dec 16 07:40:28 PST 2010
On 12/16/2010 08:26 AM, ext 侃 wrote:
> Now I get a problem. Cause I need to realize a function that scale
> the picture to fit the screen's width when I double hit the image, I
> need to know to the size of the image I hit.
>
> I notice that there is a class "renderImage" , but it live in the
> but I don't know how access it.
Just use the QWebFrame::hitTestContent() to get the QWebElement of your
image, and you get the geometry directly from the element.
cheers,
Benjamin
More information about the webkit-qt
mailing list