[PyQt] Trigger mouse click on arbitrary coordinate using Webkit?

Albert Cervera i Areny albert at nan-tic.com
Tue Jul 27 07:53:07 BST 2010


A Dimarts, 27 de juliol de 2010, Yao Ko va escriure:
> Hi,
> 
> I'm using Qt Webkit to load a a webpage and interact with it.  Is
> there a way to programmatically trigger a mouse click given the X, Y
> coordinates of a webpage?
> 
> So far, I was able to use QWebFrame.hitTestContent(QPoint) to get the
> QWebElement under the given QPoint.  However, the element is a Flash
> object, and I'd like to trigger a mouse click somewhere on that Flash
> object.
> 
> Any suggestions?

I guess postEvent() or sendEvent() should do the trick.

> 
> Thanks,
> Yao
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt


-- 
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partners
Mòbil: +34 669 40 40 18

http://twitter.com/albertnan 
http://albert-nan.blogspot.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100727/8cf5c90f/attachment.html>


More information about the PyQt mailing list