'Converting .ui to .py
I'm trying to create my very first gui via Pyqt 5, and python 3.6
I created the interface in Qt designer ,got needed .ui file and now want to translate it to .py. I found that it could be done with pyui5, but can't find how.
Used this to start .ui through python:
app = QApplication(sys.argv)
widget = loadUi('D:\test.ui')
widget.show()
sys.exit(app.exec_())
But I can't change anything in code,so transformation from .ui to .py is needed. Pyuic5 command in cmd is not working.
Thank you in advance!
Solution 1:[1]
Well, I solved the problem. I installed pyqt via pip, after that found pyuic5.bat in Library/Bin folder. Then transformed with it .ui to .py
Solution 2:[2]
You should use pyuic4 command:
pyuic4 input.ui -o output.py
Solution 3:[3]
I have created an Application to convert the .ui (Pyqt5 Created by qt designer) file to py.
you can convert your file easily using this application Direct Download Link: https://download1653.mediafire.com/utmxc4pza7ug/1f0gkwk6577g7fi/Ui+to+Py.zip
Mediafire link to download: https://www.mediafire.com/file/1f0gkwk6577g7fi/Ui_to_Py.zip/file
you check the source code of the application on my GitHub: https://github.com/Harvindar994/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Acapulka |
| Solution 2 | Liam |
| Solution 3 | Harvindar Singh |
