838 if self.project.getProjectLanguage() in [ |
838 if self.project.getProjectLanguage() in [ |
839 "Python", "Python2", "Python3" |
839 "Python", "Python2", "Python3" |
840 ]: |
840 ]: |
841 dirname, filename = os.path.split(ofn) |
841 dirname, filename = os.path.split(ofn) |
842 self.compiledFile = os.path.join(dirname, "Ui_" + filename + ".py") |
842 self.compiledFile = os.path.join(dirname, "Ui_" + filename + ".py") |
843 args.append("-x") |
|
844 indentWidth = Preferences.getQt("PyuicIndent") |
|
845 if indentWidth != self.PyuicIndentDefault: |
|
846 args.append("--indent={0}".format(indentWidth)) |
|
847 |
843 |
848 if self.project.getProjectType() in ["PySide", "PySide2"]: |
844 if self.project.getProjectType() in ["PySide", "PySide2"]: |
849 # PySide and PySide2 |
845 # PySide and PySide2 |
850 if Preferences.getQt("PyuicFromImports"): |
846 if Preferences.getQt("PyuicFromImports"): |
851 args.append("--from-imports") |
847 args.append("--from-imports") |
852 else: |
848 else: |
853 # PyQt4 and PyQt5 |
849 # PyQt4 and PyQt5 |
|
850 args.append("-x") |
|
851 indentWidth = Preferences.getQt("PyuicIndent") |
|
852 if indentWidth != self.PyuicIndentDefault: |
|
853 args.append("--indent={0}".format(indentWidth)) |
854 if ( |
854 if ( |
855 'uic5' in uicompiler and |
855 'uic5' in uicompiler and |
856 self.project.pdata["UICPARAMS"]["Package"] |
856 self.project.pdata["UICPARAMS"]["Package"] |
857 ): |
857 ): |
858 args.append("--import-from={0}".format( |
858 args.append("--import-from={0}".format( |