--- a/eric7/UI/Browser.py Sun May 16 11:43:59 2021 +0200 +++ b/eric7/UI/Browser.py Sun May 16 20:07:24 2021 +0200 @@ -10,13 +10,13 @@ import os import shutil -from PyQt5.QtCore import ( +from PyQt6.QtCore import ( pyqtSignal, pyqtSlot, Qt, QUrl, QCoreApplication, QItemSelectionModel, QModelIndex, QElapsedTimer ) -from PyQt5.QtGui import QDesktopServices -from PyQt5.QtWidgets import ( - QTreeView, QApplication, QMenu, QAbstractItemView, QAction, QInputDialog, +from PyQt6.QtGui import QAction, QDesktopServices +from PyQt6.QtWidgets import ( + QTreeView, QApplication, QMenu, QAbstractItemView, QInputDialog, QLineEdit, QDialog ) @@ -356,7 +356,7 @@ @param mouseEvent the mouse event (QMouseEvent) """ - index = self.indexAt(mouseEvent.pos()) + index = self.indexAt(mouseEvent.position().toPoint()) if index.isValid(): itm = self.model().item(index) if isinstance(itm, ( @@ -385,9 +385,10 @@ if index.isValid(): self.setCurrentIndex(index) - flags = QItemSelectionModel.SelectionFlags( + flags = ( QItemSelectionModel.SelectionFlag.ClearAndSelect | - QItemSelectionModel.SelectionFlag.Rows) + QItemSelectionModel.SelectionFlag.Rows + ) self.selectionModel().select(index, flags) itm = self.model().item(index)