diff -r 2eeec6bc49e6 -r 4621c9082a43 eric6/Project/ProjectFormsBrowser.py --- a/eric6/Project/ProjectFormsBrowser.py Wed Dec 23 16:28:35 2020 +0100 +++ b/eric6/Project/ProjectFormsBrowser.py Thu Dec 24 16:17:57 2020 +0100 @@ -127,7 +127,7 @@ projectType = self.project.getProjectType() self.menu = QMenu(self) - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.menu.addAction( self.tr('Compile form'), self.__compileForm) self.menu.addAction( @@ -187,7 +187,7 @@ act = self.menu.addAction(self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.menu.addSeparator() - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.menu.addAction(self.tr('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: @@ -210,8 +210,9 @@ self.backMenu = QMenu(self) if ( - projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"] or - self.hooks["compileAllForms"] is not None + projectType in [ + "PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6" + ] or self.hooks["compileAllForms"] is not None ): self.backMenu.addAction( self.tr('Compile all forms'), self.__compileAllForms) @@ -241,7 +242,7 @@ # create the menu for multiple selected files self.multiMenu = QMenu(self) - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.multiMenu.addAction( self.tr('Compile forms'), self.__compileSelectedForms) self.multiMenu.addSeparator() @@ -286,7 +287,7 @@ self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.dirMenu.addAction( self.tr('Compile all forms'), self.__compileAllForms) self.dirMenu.addSeparator() @@ -309,7 +310,7 @@ self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.dirMenu.addAction(self.tr('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: @@ -333,7 +334,7 @@ self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) - if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2"]: + if projectType in ["PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6"]: self.dirMultiMenu.addAction( self.tr('Compile all forms'), self.__compileAllForms) self.dirMultiMenu.addSeparator() @@ -568,7 +569,7 @@ self.hooks["newForm"](path) else: if self.project.getProjectType() in [ - "PyQt5", "PyQt6", "E6Plugin", "PySide2" + "PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6" ]: self.__newUiForm(path) @@ -692,7 +693,10 @@ 'pyuic5', ["py3uic5"]) elif self.project.getProjectType() == "PySide2": self.__uicompiler = Utilities.generatePySideToolPath( - 'pyside2-uic') + 'pyside2-uic', variant=2) + elif self.project.getProjectType() == "PySide6": + self.__uicompiler = Utilities.generatePySideToolPath( + 'pyside6-uic', variant=6) def getUiCompiler(self): """ @@ -709,7 +713,7 @@ def __readStdout(self): """ Private slot to handle the readyReadStandardOutput signal of the - pyuic5/pyuic6/pyside2-uic process. + pyuic5/pyuic6/pyside2-uic/pyside6-uic process. """ if self.compileProc is None: return @@ -722,7 +726,7 @@ def __readStderr(self): """ Private slot to handle the readyReadStandardError signal of the - pyuic5/pyuic6/pyside2-uic process. + pyuic5/pyuic6/pyside2-uic/pyside6-uic process. """ if self.compileProc is None: return @@ -828,6 +832,10 @@ # PySide2 if Preferences.getQt("PySide2FromImports"): args.append("--from-imports") + elif self.project.getProjectType() == "PySide6": + # PySide6 + if Preferences.getQt("PySide6FromImports"): + args.append("--from-imports") elif self.project.getProjectType() == "PyQt6": # PyQt6 if Preferences.getQt("Pyuic6Execute"): @@ -1000,7 +1008,7 @@ self.hooks["compileChangedForms"](self.project.pdata["FORMS"]) else: if self.project.getProjectType() not in [ - "PyQt5", "PyQt6", "E6Plugin", "PySide2" + "PyQt5", "PyQt6", "E6Plugin", "PySide2", "PySide6" ]: # ignore the request for non Qt GUI projects return