Having a DOM of the following html;
<a href="?op=order">
<img class="img_button" src="picture.gif"
onMouseOver="this.src='some.gif';"
onMouseOut="this.src='some_other.gif';"
alt="" border="0">
</a>
how to follow a link (href) in QWebKit (specifically QWebPage).
Please notice that it's an image that is linked.
I can't do it (and I don't want to even if I could) by simulating a mouse click as I don't use QWebView thus I don't have the page rendered.
If you have QWebView and don't care about scrolling automatization, this may help:
Assuming you have the link's QWebElement in a variable called "link" (located through findFirst or whatever):
(This is in Python, but it is the Javascript that matters. And yes, this is simulating a mouse click, but since it does not use coordinates, it works fine with an unrendered QWebPage.)
Using DOM's
click()
Java Script function on the element makes the trick: