--- a/eric6/Preferences/MouseClickDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Preferences/MouseClickDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -39,8 +39,10 @@ self.clearButton.installEventFilter(self) self.clickEdit.installEventFilter(self) - self.buttonBox.button(QDialogButtonBox.Ok).installEventFilter(self) - self.buttonBox.button(QDialogButtonBox.Cancel).installEventFilter(self) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).installEventFilter(self) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Cancel).installEventFilter(self) self.__modifiers = modifiers self.__button = button @@ -55,8 +57,8 @@ """ Private slot to clear the entered sequence. """ - self.__modifiers = Qt.NoModifier - self.__button = Qt.NoButton + self.__modifiers = Qt.KeyboardModifier.NoModifier + self.__button = Qt.MouseButton.NoButton self.__showClickText() def __showClickText(self): @@ -64,7 +66,7 @@ Private method to show a string representing the entered mouse click sequence. """ - if self.__button == Qt.NoButton: + if self.__button == Qt.MouseButton.NoButton: self.clickEdit.setText("") else: self.clickEdit.setText(MouseUtilities.MouseButtonModifier2String( @@ -82,7 +84,7 @@ @rtype bool """ if ( - event.type() == QEvent.MouseButtonRelease and + event.type() == QEvent.Type.MouseButtonRelease and watched == self.clickEdit ): self.__modifiers = int(event.modifiers())