E5TabWidgets: fixed an issue using Qt.MouseButtons. eric7

Fri, 21 May 2021 17:42:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 21 May 2021 17:42:10 +0200
branch
eric7
changeset 8340
439b5c4c9115
parent 8339
75908476226e
child 8341
e470de1e6628

E5TabWidgets: fixed an issue using Qt.MouseButtons.

eric7/E5Gui/E5TabWidget.py file | annotate | diff | comparison | revisions
--- a/eric7/E5Gui/E5TabWidget.py	Thu May 20 19:52:44 2021 +0200
+++ b/eric7/E5Gui/E5TabWidget.py	Fri May 21 17:42:10 2021 +0200
@@ -83,9 +83,9 @@
         @param event reference to the mouse move event (QMouseEvent)
         """
         if (
-            event.buttons() == Qt.MouseButtons(Qt.MouseButton.LeftButton) and
-            (event.position().toPoint() - self.__dragStartPos).manhattanLength() >
-            QApplication.startDragDistance()
+            event.buttons() == Qt.MouseButton.LeftButton and
+            (event.position().toPoint() - self.__dragStartPos)
+            .manhattanLength() > QApplication.startDragDistance()
         ):
             drag = QDrag(self)
             mimeData = QMimeData()

eric ide

mercurial