-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Hi all :)<br><br>I answer myself here, in order someone needs this.<br><br>key word is setMouseTracking !!<br><br>here is a widget (QLabel) I call just after creation of the widget I need.
<br><br><br>class Hover(QtGui.QLabel):<br> def __init__(self, parent):<br> QtGui.QLabel.__init__(self,parent)<br> <br>self.setGeometry(QtCore.QRect(10,60,640,480))<br> self.setMouseTracking(1)<br><br>
def mouseMoveEvent(self, event):<br> print "on Hover",<br>event.pos().x(), event.pos().y()<br><br>Clear skies, <br><br>JB<br><br><br><br><br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.7 (GNU/Linux)
<br>Comment: <a href="http://firegpg.tuxfamily.org">http://firegpg.tuxfamily.org</a><br><br>iD8DBQFHf6onetOZWwsO2AERAr7yAJ97SDmwA5MZrGAR3aepHUGN96iMmQCgiqeP<br>kdJ87+GZ/+yvlgEsEvR/AW8=<br>=P1Rw<br>-----END PGP SIGNATURE-----
<br><span class="gmail_quote">2008/1/4, Jean-Baptiste BUTET <<a href="mailto:ashashiwa@gmail.com">ashashiwa@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Hi all :)<br><br>I'm trying to do this : <br>- -> when mouse is on a label, position ou cursor should be given.<br><br>so i've done a :<br>def enterEvent(self, event):
<br> a = QtGui.QHoverEvent()<br> x = a.pos(self)<br><br>- -> Errors :<br> a = QtGui.QHoverEvent()<br>TypeError: insufficient number of arguments to QHoverEvent()<br><br>So i've consulting : <br><a href="http://docs.huihoo.com/pyqt/pyqt4/html/qhoverevent.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://docs.huihoo.com/pyqt/pyqt4/html/qhoverevent.html</a><br><br>but don't understand how to implement it...<br><br>Someone to help me, please ? :)<br><br>JB<br><br>- -- <br><a href="http://astrolix.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://astrolix.org
</a><br>association des linuxiens astronomes<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.7 (GNU/Linux)<br>Comment: <a href="http://firegpg.tuxfamily.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://firegpg.tuxfamily.org</a><br><br>iD8DBQFHfoZGetOZWwsO2AERAoEJAJ9Tnhmf0ziEzy+OHKSylAfqYNwGPACgwaD8
<br>esrWStltSpkIHhBN5jPGfFM=<br>=nfNU<br>-----END PGP SIGNATURE-----<br><br><br>
</blockquote><br><br clear="all"><br>-- <br><a href="http://astrolix.org">http://astrolix.org</a><br>association des linuxiens astronomes
<br><br>