commit 9f4a9145261bd0ef2ad788ef269004eeec4bdfff
parent 617fb36b06a183b165c25ef159911514839f929b
Author: ThomasV <thomasv@gitorious>
Date: Sat, 2 May 2015 13:36:10 +0200
change mouse cursor over clickable labels
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/gui/qt/util.py b/gui/qt/util.py
@@ -115,10 +115,19 @@ class HelpLabel(QLabel):
def __init__(self, text, help_text):
QLabel.__init__(self, text)
self.help_text = help_text
+ self.app = QCoreApplication.instance()
def mouseReleaseEvent(self, x):
QMessageBox.information(self, 'Help', self.help_text, 'OK')
+ def enterEvent(self, event):
+ self.app.setOverrideCursor(QCursor(Qt.WhatsThisCursor))
+ return QLabel.enterEvent(self, event)
+
+ def leaveEvent(self, event):
+ self.app.setOverrideCursor(QCursor(Qt.ArrowCursor))
+ return QLabel.leaveEvent(self, event)
+
class HelpButton(QPushButton):
def __init__(self, text):