Reputation: 583
I am currently trying to make GUI in python. For this, the way I found is to use Qt Designer to generate a graphical interface .ui, and to convert it in .py with PyQt4, to edit functions in python.
The question I have is then how to modify the graphical interface without having to set up again the whole python code ?
Indeed, if I want for instance to add a button in the interface, with a particular function, I would simply like to add this function in the .py, without doing again the whole .py
To sum up, I would like to be able to update in the future my interface easily.
Do you have any idea ?
Thank you in advance ! :)
Upvotes: 1
Views: 4455
Reputation: 4367
Answer. If you're going to modify code from Qt Designer (via pyuic), understand that the process is one way:
.ui file -> pyuic -> .py
pyuic (and uic, the Qt/C++ equivalent) are one way code generators. You can't take existing Python code and make a .ui file for Qt Designer.
Addendum
That said, you have three choices:
Personally, I will create a mockup of complex forms or dialogs in Qt Designer for visual reference, but do all of the coding myself.
Upvotes: 2