Pyside6: generate and save Python code automatically in Designer when saving UI
-
I have this working in QtCreator, which is my current universal C++ IDE, but sometimes I use Qt Designer with other tools like VSCode and some people I know uses it, but can't see a way to update automatically the .py generated file from the .ui like QtC does.
Is there some option to automate the process with Qt Designer or is the only way by saving manually from menu Form -> View Python Code and Save?
-
Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file.
It seems you didn't read entirely the OP, it does, from the
Form
menu, the only annoying issue is that it's not automatic when saving theui
for obvious reasons.So probably I could make a designer plugin that does it, regardless to the IDE editor used.
There are some limitation in Designer plugins that makes this less useful than the current option. -
@redtide
Designer only saves the.ui
file. You need to runpyside6-uic
to convert that to the.py
file. Creator does this for you when you "build" or whatever. I don't know how vscode works, but if you can run an OS command like that from there you would be good. -
Designer only saves the .ui file. You need to run pyside6-uic to convert that to the .py file.
It seems you didn't read entirely the OP, it does, from the
Form
menu, the only annoying issue is that it's not automatic when saving theui
for obvious reasons.So probably I could make a designer plugin that does it, regardless to the IDE editor used.
There are some limitation in Designer plugins that makes this less useful than the current option. -
R redtide has marked this topic as solved on