1010 if srcDir: |
1010 if srcDir: |
1011 sys.path.insert(1, os.path.join(self.project.getAbsolutePath(srcDir))) |
1011 sys.path.insert(1, os.path.join(self.project.getAbsolutePath(srcDir))) |
1012 cwd = os.getcwd() |
1012 cwd = os.getcwd() |
1013 os.chdir(os.path.dirname(os.path.abspath(fn))) |
1013 os.chdir(os.path.dirname(os.path.abspath(fn))) |
1014 try: |
1014 try: |
1015 dlg = CreateDialogCodeDialog(fn, self.project, self) |
1015 dlg = CreateDialogCodeDialog(fn, self.project, parent=self) |
1016 if not dlg.initError(): |
1016 if not dlg.initError(): |
1017 dlg.exec() |
1017 dlg.exec() |
1018 finally: |
1018 finally: |
1019 # reset the environment |
1019 # reset the environment |
1020 os.chdir(cwd) |
1020 os.chdir(cwd) |
1195 from .UicCompilerOptionsDialog import UicCompilerOptionsDialog |
1195 from .UicCompilerOptionsDialog import UicCompilerOptionsDialog |
1196 |
1196 |
1197 params = self.project.getProjectData(dataKey="UICPARAMS") |
1197 params = self.project.getProjectData(dataKey="UICPARAMS") |
1198 |
1198 |
1199 if self.project.getProjectType() in ["PyQt5", "PyQt6", "E7Plugin"]: |
1199 if self.project.getProjectType() in ["PyQt5", "PyQt6", "E7Plugin"]: |
1200 dlg = UicCompilerOptionsDialog(params, self.getUiCompiler()) |
1200 dlg = UicCompilerOptionsDialog(params, self.getUiCompiler(), parent=self) |
1201 if dlg.exec() == QDialog.DialogCode.Accepted: |
1201 if dlg.exec() == QDialog.DialogCode.Accepted: |
1202 package, suffix, root = dlg.getData() |
1202 package, suffix, root = dlg.getData() |
1203 if package != params["Package"]: |
1203 if package != params["Package"]: |
1204 params["Package"] = package |
1204 params["Package"] = package |
1205 self.project.setDirty(True) |
1205 self.project.setDirty(True) |