162 projectType = self.project.getProjectType() |
162 projectType = self.project.getProjectType() |
163 |
163 |
164 venvName = self.project.getDebugProperty("VIRTUALENV") |
164 venvName = self.project.getDebugProperty("VIRTUALENV") |
165 if not venvName: |
165 if not venvName: |
166 # no project specific environment, try a type specific one |
166 # no project specific environment, try a type specific one |
167 if projectType in ("PyQt5", "E6Plugin", "PySide2"): |
167 if projectType in ("PyQt5", "PySide2"): |
168 venvName = Preferences.getQt("PyQtVenvName") |
168 venvName = Preferences.getQt("PyQtVenvName") |
169 elif projectType in ("PyQt6", "PySide6"): |
169 elif projectType in ("PyQt6", "E7Plugin", "PySide6"): |
170 venvName = Preferences.getQt("PyQt6VenvName") |
170 venvName = Preferences.getQt("PyQt6VenvName") |
171 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
171 interpreter = venvManager.getVirtualenvInterpreter(venvName) |
172 execPath = venvManager.getVirtualenvExecPath(venvName) |
172 execPath = venvManager.getVirtualenvExecPath(venvName) |
173 |
173 |
174 if not interpreter: |
174 if not interpreter: |
181 "PATH", os.pathsep.join([execPath, env.value("PATH")]) |
181 "PATH", os.pathsep.join([execPath, env.value("PATH")]) |
182 ) |
182 ) |
183 else: |
183 else: |
184 env.insert("PATH", execPath) |
184 env.insert("PATH", execPath) |
185 |
185 |
186 if projectType in ("PyQt5", "E6Plugin", "PySide2"): |
186 if projectType in ("PyQt5", "PySide2"): |
187 loadUi = os.path.join(os.path.dirname(__file__), "UicLoadUi5.py") |
187 loadUi = os.path.join(os.path.dirname(__file__), "UicLoadUi5.py") |
188 elif projectType in ("PyQt6", "PySide6"): |
188 elif projectType in ("PyQt6", "E7Plugin", "PySide6"): |
189 loadUi = os.path.join(os.path.dirname(__file__), "UicLoadUi6.py") |
189 loadUi = os.path.join(os.path.dirname(__file__), "UicLoadUi6.py") |
190 args = [ |
190 args = [ |
191 loadUi, |
191 loadUi, |
192 command, |
192 command, |
193 self.formFile, |
193 self.formFile, |
411 "impl_pyside2.py.tmpl") |
411 "impl_pyside2.py.tmpl") |
412 elif self.project.getProjectType() == "PySide6": |
412 elif self.project.getProjectType() == "PySide6": |
413 tmplName = os.path.join( |
413 tmplName = os.path.join( |
414 getConfig('ericCodeTemplatesDir'), |
414 getConfig('ericCodeTemplatesDir'), |
415 "impl_pyside6.py.tmpl") |
415 "impl_pyside6.py.tmpl") |
416 elif self.project.getProjectType() in [ |
416 elif self.project.getProjectType() == "PyQt5": |
417 "PyQt5", "E6Plugin"]: |
|
418 tmplName = os.path.join( |
417 tmplName = os.path.join( |
419 getConfig('ericCodeTemplatesDir'), |
418 getConfig('ericCodeTemplatesDir'), |
420 "impl_pyqt5.py.tmpl") |
419 "impl_pyqt5.py.tmpl") |
421 elif self.project.getProjectType() == "PyQt6": |
420 elif self.project.getProjectType() in [ |
|
421 "PyQt6", "E7Plugin" |
|
422 ]: |
422 tmplName = os.path.join( |
423 tmplName = os.path.join( |
423 getConfig('ericCodeTemplatesDir'), |
424 getConfig('ericCodeTemplatesDir'), |
424 "impl_pyqt6.py.tmpl") |
425 "impl_pyqt6.py.tmpl") |
425 else: |
426 else: |
426 E5MessageBox.critical( |
427 E5MessageBox.critical( |