[PyQt] KHTMLPart mouse events

Jim Bublitz jbublitz at nwinternet.com
Fri Jan 9 17:23:31 GMT 2009


On Friday 09 January 2009 08:50:07 am Christoph Burgmer wrote:
> Jim, Simon, I hope you can help me.
>
> I am trying to track a user's MidButton mouse click to track "paste"
> actions.
>
> It seems that
> khtmlMousePressEvent (khtml::MousePressEvent* event)
> is the right place to do that, but the sip-file does not have those
> mouse event methods, they are commented out.
>
> Can that be changed in a later version? Is there a reason for them
> not being activated? The KHTMLPart itself does the MidButton action
> in these methods[1].

I suspect that khtml::MousePressEvent is not a class that's exposed in 
the "public" KDE API - meaning it's declared in some file that PyKDE 
doesn't wrap. So if you got one, you couldn't do anything with it 
anyway, since it's not a wrapped class.

However, there are mouse events (QMouseEvent) available in KHTMLView, 
and you can get the KHTMLView object from the part by calling it's 
view() method. 

Don't know if those will do what you want, but it seems like they 
should.

Jim



More information about the PyQt mailing list