Convert pyQt UI to python
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!
Solution 1:
You can use pyuic4
command on shell:
pyuic4 input.ui -o output.py
Solution 2:
For pyqt5 you can use
pyuic5 xyz.ui > xyz.py
or
pyuic5 xyz.ui -o xyz.py
Solution 3:
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:
c:\Python27\Lib\site-packages\PyQt4\something> pyuic4.exe full/path/to/input.ui -o full/path/to/output.py
or call it using its full path
full/path/to/my/files> c:\Python27\Lib\site-packages\PyQt4\something\pyuic4.exe input.ui -o output.py