eric6/WebBrowser/UrlBar/FavIconLabel.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/WebBrowser/UrlBar/FavIconLabel.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/WebBrowser/UrlBar/FavIconLabel.py	Tue Mar 02 17:17:09 2021 +0100
@@ -27,8 +27,8 @@
         self.__browser = None
         self.__dragStartPos = QPoint()
         
-        self.setFocusPolicy(Qt.NoFocus)
-        self.setCursor(Qt.ArrowCursor)
+        self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
+        self.setCursor(Qt.CursorShape.ArrowCursor)
         self.setMinimumSize(16, 16)
         self.resize(16, 16)
         
@@ -65,7 +65,7 @@
         
         @param evt reference to the mouse event (QMouseEvent)
         """
-        if evt.button() == Qt.LeftButton:
+        if evt.button() == Qt.MouseButton.LeftButton:
             self.__dragStartPos = evt.pos()
         super(FavIconLabel, self).mousePressEvent(evt)
     
@@ -75,7 +75,7 @@
         
         @param evt reference to the mouse event (QMouseEvent)
         """
-        if evt.button() == Qt.LeftButton:
+        if evt.button() == Qt.MouseButton.LeftButton:
             self.__showPopup(evt.globalPos())
         super(FavIconLabel, self).mouseReleaseEvent(evt)
     
@@ -86,7 +86,7 @@
         @param evt reference to the mouse event (QMouseEvent)
         """
         if (
-            evt.button() == Qt.LeftButton and
+            evt.button() == Qt.MouseButton.LeftButton and
             ((evt.pos() - self.__dragStartPos).manhattanLength() >
                 QApplication.startDragDistance()) and
             self.__browser is not None

eric ide

mercurial