eric6/E5Gui/E5ClickableLabel.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/E5Gui/E5ClickableLabel.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/E5Gui/E5ClickableLabel.py	Tue Mar 02 17:17:09 2021 +0100
@@ -31,7 +31,7 @@
         """
         super(E5ClickableLabel, self).__init__(parent)
         
-        self.setCursor(Qt.PointingHandCursor)
+        self.setCursor(Qt.CursorShape.PointingHandCursor)
     
     def mouseReleaseEvent(self, evt):
         """
@@ -39,13 +39,16 @@
         
         @param evt mouse event (QMouseEvent)
         """
-        if evt.button() == Qt.LeftButton and self.rect().contains(evt.pos()):
-            if evt.modifiers() == Qt.ControlModifier:
+        if (
+            evt.button() == Qt.MouseButton.LeftButton and
+            self.rect().contains(evt.pos())
+        ):
+            if evt.modifiers() == Qt.KeyboardModifier.ControlModifier:
                 self.middleClicked.emit(evt.globalPos())
             else:
                 self.clicked.emit(evt.globalPos())
         elif (
-            evt.button() == Qt.MidButton and
+            evt.button() == Qt.MouseButton.MidButton and
             self.rect().contains(evt.pos())
         ):
             self.middleClicked.emit(evt.globalPos())

eric ide

mercurial