eric6/VirtualEnv/VirtualenvConfigurationDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8176
31965986ecd1
child 8218
7c09585bd960
diff -r 27f636beebad -r 2c730d5fd177 eric6/VirtualEnv/VirtualenvConfigurationDialog.py
--- a/eric6/VirtualEnv/VirtualenvConfigurationDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/VirtualEnv/VirtualenvConfigurationDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -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