[Eric] Is this enough to "Generage Dialog Code" for PySide at *.ui file on Python3.2 and ERIC5?

Detlev Offenbach detlev at die-offenbachs.de
Fri May 18 11:45:12 BST 2012


Hello,

thanks for the patch. The change will be part of the next release.

Regards,
Detlev

Am Donnerstag, 17. Mai 2012, 15:19:42 schrieb 진석오:
> Eric5 doesn't seem to generate dialog code for PySide.
> 
> 
> --- CreateDialogCodeDialog.py.orig    Sun Apr 29 16:00:36 2012
> +++ CreateDialogCodeDialog.py    Thu May 17 15:15:44 2012
> @@ -317,8 +317,18 @@
>                          tmplName =
> os.path.join(getConfig('ericCodeTemplatesDir'),
>                                                  "impl_pyqt.py2.tmpl")
>                  else:
> -                    tmplName =
> os.path.join(getConfig('ericCodeTemplatesDir'),
> +                ###################################################
> +                # add PySide case
> +                # just copy
> site-packages\eric5\CodeTemplates\impl_pyside.py2.tmpl to
> impl_pyside.py.tmpl
> +                # before modifying this code
> +                    if self.project.getProjectType() == "PySide":
> +                        tmplName =
> os.path.join(getConfig('ericCodeTemplatesDir'),
> +                                                "impl_pyside.py.tmpl")
> +                    else:
> +                        tmplName =
> os.path.join(getConfig('ericCodeTemplatesDir'),
>                                              "impl_pyqt.py.tmpl")
> +                # End of Modification
> +                ###################################################
>                  tmplFile = open(tmplName, 'r', encoding="utf-8")
>                  template = tmplFile.read()
>                  tmplFile.close()
> @@ -388,7 +398,15 @@
>              else:
>                  pyqtSignatureFormat = '@pyqtSignature("{0}")'
>          else:
> -            pyqtSignatureFormat = '@pyqtSlot({0})'
> +        ###################################################
> +        # add PySide case
> +        # before modifying this code
> +            if self.project.getProjectType() == "PySide":
> +                pyqtSignatureFormat = '@Slot({0})'
> +            else:
> +                pyqtSignatureFormat = '@pyqtSlot({0})'
> +        # End of Modification
> +        ####################################################
>          for row in range(self.slotsModel.rowCount()):
>              topItem = self.slotsModel.item(row)
>              for childRow in range(topItem.rowCount()):
> 
> 
> jinsuk
-- 

Detlev Offenbach
detlev at die-offenbachs.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20120518/7a99fc15/attachment.html>


More information about the Eric mailing list