eric7/WebBrowser/UrlBar/FavIconLabel.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8319
ea11a3948f40
--- a/eric7/WebBrowser/UrlBar/FavIconLabel.py	Sun May 16 11:43:59 2021 +0200
+++ b/eric7/WebBrowser/UrlBar/FavIconLabel.py	Sun May 16 20:07:24 2021 +0200
@@ -7,9 +7,9 @@
 Module implementing the label to show the web site icon.
 """
 
-from PyQt5.QtCore import Qt, QPoint, QMimeData
-from PyQt5.QtGui import QDrag, QPixmap
-from PyQt5.QtWidgets import QLabel, QApplication
+from PyQt6.QtCore import Qt, QPoint, QMimeData
+from PyQt6.QtGui import QDrag, QPixmap
+from PyQt6.QtWidgets import QLabel, QApplication
 
 
 class FavIconLabel(QLabel):
@@ -66,7 +66,7 @@
         @param evt reference to the mouse event (QMouseEvent)
         """
         if evt.button() == Qt.MouseButton.LeftButton:
-            self.__dragStartPos = evt.pos()
+            self.__dragStartPos = evt.position().toPoint()
         super().mousePressEvent(evt)
     
     def mouseReleaseEvent(self, evt):
@@ -87,7 +87,7 @@
         """
         if (
             evt.button() == Qt.MouseButton.LeftButton and
-            ((evt.pos() - self.__dragStartPos).manhattanLength() >
+            ((evt.position().toPoint() - self.__dragStartPos).manhattanLength() >
                 QApplication.startDragDistance()) and
             self.__browser is not None
         ):

eric ide

mercurial