[Closed] Use QtDesigner for PySide UI or not?
I don’t use. I prefer to code whole UI.
I have my own rules how UI part of code must be organized. It helps me easy find element, edit, copy/paste, rename, etc.
Also I’m using a lot of my extended controls which is not easy to add to the Designer
Also some controls might look different in the Designer and in the tool.
Another thing is auto-alignment, docking and stretching of UI control. It’s possible to do in the Designer but very hard to tweak and debug.
And more… I like to have whole tool in one file.
Thanks! I guess I’ll fo hand crafted way.
BTW…could u also give an advice for develping script for multiple DCC with Qt?
Like how should I organize modules what not?
Template script would be really awesome… I know I’m asking too much…
Let’s say I need to make a tool which will share UI for Max and Maya and Houdini and possibly even standalone.
For exmaple, light rig setup.
I need 4 buttons like Day/Light/interior/Overcast. I have 4 predefined hdri map.
When I press each button, it makes a dome light apply the predefined map as texture for the light.
I guess I need to make an UI file and load a different module with same function name per DCC???
Since I’m real beginner of Python and PySide.
I want to start in a proper(?) way.
So… any pointer or tip would be welcome.
I would not do it universal. I like when any custom tool (third-party) that used in the main (MAX, Maya, Houdini) looks like as main UI appearance. It should not look like, but also work the same way.
all these main tools provide their own controls…
so if you will do a universal UI it might look and work for all tools as an alien
I wish I can decide that.
I’m all for having own UI for each DCC since they have own characteristics and requirement.
But, others think otherwise.
I have to make it.
forgot to add another reason to not use Designer…
I pretty often use dynamic controls
my suggested pipeline is:
Separate your code to three parts: UI(designer),UI(converted to code) and Main Code.
UI (.ui):
Create UI file by using designer. This file originally is a xml file that consist of controls and style data.
UI (.py):
convert created .ui file to the python code . This gives you a window class that later you will use it in the main code.(python has some built-in library to do this).
Main Code (.py):
this is the code that change based on the “DDC” software. Create a window class in this code and completely replace its window.ui property with your created UI. Add (connect) handlers to functions based on target software.
Benefit of this pipeline is that you can easily edit UI file without changing the main code.