21 pyqtSlot, |
21 pyqtSlot, |
22 ) |
22 ) |
23 from PyQt6.QtGui import QBrush, QColor, QStandardItem, QStandardItemModel |
23 from PyQt6.QtGui import QBrush, QColor, QStandardItem, QStandardItemModel |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
25 |
25 |
26 from eric7 import Globals, Preferences |
26 from eric7 import Preferences |
27 from eric7.EricWidgets import EricMessageBox |
27 from eric7.EricWidgets import EricMessageBox |
28 from eric7.EricWidgets.EricApplication import ericApp |
28 from eric7.EricWidgets.EricApplication import ericApp |
29 from eric7.Globals import getConfig |
29 from eric7.Globals import getConfig |
|
30 from eric7.SystemUtilities import PythonUtilities |
30 from eric7.Utilities import ModuleParser |
31 from eric7.Utilities import ModuleParser |
31 |
32 |
32 from .NewDialogClassDialog import NewDialogClassDialog |
33 from .NewDialogClassDialog import NewDialogClassDialog |
33 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
34 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
34 |
35 |
183 venvName = Preferences.getQt("PyQt6VenvName") |
184 venvName = Preferences.getQt("PyQt6VenvName") |
184 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
185 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
185 execPath = venvManager.getVirtualenvExecPath(venvName) |
186 execPath = venvManager.getVirtualenvExecPath(venvName) |
186 |
187 |
187 if not interpreter: |
188 if not interpreter: |
188 interpreter = Globals.getPythonExecutable() |
189 interpreter = PythonUtilities.getPythonExecutable() |
189 |
190 |
190 env = QProcessEnvironment.systemEnvironment() |
191 env = QProcessEnvironment.systemEnvironment() |
191 if execPath: |
192 if execPath: |
192 if env.contains("PATH"): |
193 if env.contains("PATH"): |
193 env.insert("PATH", os.pathsep.join([execPath, env.value("PATH")])) |
194 env.insert("PATH", os.pathsep.join([execPath, env.value("PATH")])) |