--- a/eric6/Preferences/SubstyleDefinitionDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Preferences/SubstyleDefinitionDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -52,7 +52,7 @@ """ Private slot to update the state of the OK button. """ - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( bool(self.descriptionEdit.text().strip()) and bool(self.wordsEdit.toPlainText().strip()) )