--- a/eric6/MicroPython/ConnectionSelectionDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/MicroPython/ConnectionSelectionDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -21,8 +21,8 @@ Class implementing a dialog to select the port to connect to and the type of the attached device. """ - PortNameRole = Qt.UserRole - VidPidRole = Qt.UserRole + 1 + PortNameRole = Qt.ItemDataRole.UserRole + VidPidRole = Qt.ItemDataRole.UserRole + 1 def __init__(self, ports, currentPort, currentType, parent=None): """ @@ -79,7 +79,7 @@ """ Private method to update the status of the OK button. """ - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( bool(self.portNameComboBox.currentData(self.PortNameRole)) and bool(self.deviceTypeComboBox.currentData()) )