--- a/eric6/E5Gui/E5TextInputDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Gui/E5TextInputDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -38,7 +38,8 @@ self.__layout.addWidget(self.__lineEdit) self.__buttonBox = QDialogButtonBox( - QDialogButtonBox.Ok | QDialogButtonBox.Cancel, self) + QDialogButtonBox.StandardButton.Ok | + QDialogButtonBox.StandardButton.Cancel, self) self.__layout.addWidget(self.__buttonBox) self.__buttonBox.accepted.connect(self.accept) @@ -107,7 +108,7 @@ return self.label.text() -def getText(parent, title, label, mode=QLineEdit.Normal, text="", +def getText(parent, title, label, mode=QLineEdit.EchoMode.Normal, text="", minimumWidth=300): """ Function to get create a dialog to enter some text and return it. @@ -135,7 +136,7 @@ dlg.setTextValue(text) dlg.setMinimumWidth(minimumWidth) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: return True, dlg.textValue() else: return False, ""