eric6/VirtualEnv/VirtualenvConfigurationDialog.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8043
0acf98cd089a
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
--- a/eric6/VirtualEnv/VirtualenvConfigurationDialog.py	Sat Mar 06 10:00:52 2021 +0100
+++ b/eric6/VirtualEnv/VirtualenvConfigurationDialog.py	Sun Mar 28 15:00:11 2021 +0200
@@ -91,7 +91,8 @@
         self.__virtualenvFound = False
         self.__pyvenvFound = False
         self.__condaFound = False
-        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Ok).setEnabled(False)
         
         self.__mandatoryStyleSheet = "QLineEdit {border: 2px solid;}"
         self.targetDirectoryPicker.setStyleSheet(self.__mandatoryStyleSheet)
@@ -127,7 +128,8 @@
                 bool(self.nameEdit.text())
             )
             enable &= self.targetDirectoryPicker.text() != self.__envBaseDir
-            self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
+            self.buttonBox.button(
+                QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
         elif self.condaButton.isChecked():
             enable = (
                 bool(self.condaNameEdit.text()) or
@@ -141,9 +143,11 @@
                     )
                 elif self.condaRequirementsButton.isChecked():
                     enable &= bool(self.condaRequirementsFilePicker.text())
-            self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
+            self.buttonBox.button(
+                QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
         else:
-            self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
+            self.buttonBox.button(
+                QDialogButtonBox.StandardButton.Ok).setEnabled(False)
     
     def __updateUi(self):
         """

eric ide

mercurial