eric7/E5Gui/E5ClickableLabel.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8319
ea11a3948f40
--- a/eric7/E5Gui/E5ClickableLabel.py	Sun May 16 11:43:59 2021 +0200
+++ b/eric7/E5Gui/E5ClickableLabel.py	Sun May 16 20:07:24 2021 +0200
@@ -7,8 +7,8 @@
 Module implementing a clickable label.
 """
 
-from PyQt5.QtCore import pyqtSignal, Qt, QPoint
-from PyQt5.QtWidgets import QLabel
+from PyQt6.QtCore import pyqtSignal, Qt, QPoint
+from PyQt6.QtWidgets import QLabel
 
 
 class E5ClickableLabel(QLabel):
@@ -41,15 +41,15 @@
         """
         if (
             evt.button() == Qt.MouseButton.LeftButton and
-            self.rect().contains(evt.pos())
+            self.rect().contains(evt.position().toPoint())
         ):
             if evt.modifiers() == Qt.KeyboardModifier.ControlModifier:
                 self.middleClicked.emit(evt.globalPos())
             else:
                 self.clicked.emit(evt.globalPos())
         elif (
-            evt.button() == Qt.MouseButton.MidButton and
-            self.rect().contains(evt.pos())
+            evt.button() == Qt.MouseButton.MiddleButton and
+            self.rect().contains(evt.position().toPoint())
         ):
             self.middleClicked.emit(evt.globalPos())
         else:

eric ide

mercurial