<div dir="ltr">any help ! <br><br><br><div class="gmail_quote">On Tue, Feb 21, 2012 at 7:27 AM, uahmed <span dir="ltr"><<a href="mailto:gleam.uahmed@gmail.com">gleam.uahmed@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">hi ,<br><br>I want to do hover i saw an example and then write a script which will be use as i made program i am facing one problem that hover only occur if u putt mouse on the left corner of button i want that it will happen for all the button that if i move cursor on button then it should change. here is my code<br>

<br>from PyQt4 import QtGui, QtCore<br>from PyQt4.QtCore import pyqtSignal<br>import os,sys<br><br>class HoverButton(QtGui.QToolButton):<br>    def enterEvent(self,event):<br>        print("Enter")<br>        button.setStyleSheet("background-color:#45b545;")<br>

<br>    def leaveEvent(self,event):<br>        button.setStyleSheet("background-color:yellow;")<br>        print("Leave")<br>app = QtGui.QApplication(sys.argv)<br>widget = QtGui.QWidget()<br>button = QtGui.QToolButton(widget)<br>

button.setMouseTracking(True)<br>buttonss =  HoverButton(button)<br>button.setIconSize(QtCore.QSize(200,200))<br>widget.show()<br>sys.exit(app.exec_())<br><br><br></div>
</blockquote></div><br></div>