--- a/eric7/E5Gui/E5ModelMenu.py Sun May 16 11:43:59 2021 +0200 +++ b/eric7/E5Gui/E5ModelMenu.py Sun May 16 20:07:24 2021 +0200 @@ -7,9 +7,9 @@ Module implementing a menu populated from a QAbstractItemModel. """ -from PyQt5.QtCore import pyqtSignal, Qt, QModelIndex, QPoint -from PyQt5.QtGui import QFontMetrics, QDrag -from PyQt5.QtWidgets import QMenu, QAction, QApplication +from PyQt6.QtCore import pyqtSignal, Qt, QModelIndex, QPoint +from PyQt6.QtGui import QFontMetrics, QDrag, QAction +from PyQt6.QtWidgets import QMenu, QApplication import UI.PixmapCache @@ -326,7 +326,7 @@ @param evt reference to the event (QDropEvent) """ if self.__model is not None: - act = self.actionAt(evt.pos()) + act = self.actionAt(evt.position().toPoint()) parentIndex = self.__root if act is None: row = self.__model.rowCount(self.__root) @@ -357,7 +357,7 @@ @param evt reference to the event object (QMouseEvent) """ if evt.button() == Qt.MouseButton.LeftButton: - self.__dragStartPosition = evt.pos() + self.__dragStartPosition = evt.position().toPoint() super().mousePressEvent(evt) def mouseMoveEvent(self, evt): @@ -378,7 +378,7 @@ super().mouseMoveEvent(evt) return - manhattanLength = (evt.pos() - + manhattanLength = (evt.position().toPoint() - self.__dragStartPosition).manhattanLength() if manhattanLength <= QApplication.startDragDistance(): super().mouseMoveEvent(evt)