Designer's "Form -> View in Python ..." outputs Python code in one step

I just installed Qt 5.15.1. In Designer, The menu bar’s Form drop-down list includes a “View in Python …” command. It outputs Python code in one step so it’s not necessary to use uic.LoadUI() or the pyuic5 command. Be nice to describe it in any future versions of the book. I haven’t used Designer enough in the past to know when this command was added.

1 Like

Hey @STEPHEN_E_VAN_DELLEN – nice tip! I’ve never noticed that before, definitely worth mentioning.

Just remember not to edit the generated code, but save it into a file and import it/subclass it to modify it. That ensures you can keep editing the UI in Designer and just export/save over the same file, without having to re-add your other code.