[PySide] Merge tool

Lucas Tanure ltanure at gmail.com
Sun Jan 19 16:01:26 CET 2014


Hi,

I want to share with you guys one tool that I wrote for PySide.
This tools was wrote thinking in my development workflow. I wrote this
tutorial few months ago:

http://qt-project.org/wiki/QtCreator_and_PySide - I need to update this

Problem:
Develop a class that control the UI that came from QtCreator + pyside-uic.
If you change the UI, you will need to merge this changes in previous
class.

Algorithm:
1 - run pyside-uic with the new uic
2 - extrac the methods from 1, creates a dict {method_name : method_code}
3 - read the the file that holds the previous class, but only the class
that you provide the name
4 - replace methods from 3 with the methods from 2, only replace the
methods with the same name
5 - apply some changes in the result code, some just for PyCharm stop
complaining


 Tool:
https://github.com/lucastanure/GoGo-Real-Software/blob/master/qtcreator/update.py

Thanks

--
Lucas A. Tanure Alves
+55 (19) 988176559
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140119/8f0be3d8/attachment.html>


More information about the PySide mailing list