Is there a way to convert a ui formed with qtDesigner to a python version to use without having an extra file?
I'm using Maya for this UI, and converting this UI file to a readable python version to implement would be really great!
Is there a way to convert a ui formed with qtDesigner to a python version to use without having an extra file?
I'm using Maya for this UI, and converting this UI file to a readable python version to implement would be really great!
Quickest way to convert .ui to .py is from terminal:
Make sure you have pyqt4-dev-tools installed.
For Ubuntu it works for following commands; If you want individual files to contain main method to run the files individually, may be for testing purpose,
No main method in file, cannot run individually... try
Consider, I'm using PyQT5.
If you are using windows, the PyQt4 folder is not in the path by default, you have to go to it before trying to run it:
or call it using its full path
I'm not sure if PyQt does have a script like this, but after you install PySide there is a script in pythons script directory "uic.py". You can use this script to convert a .ui file to a .py file: