Is there some sort of backward compatibility with the pyuic5 shell command? I updated to pyQt5 a while ago, but I have a few projects running with pyQt4 on a separate python 3.4 environment. Unfortunately the pyuic4 shell command is now unavailable. How can I convert .ui files to pyQt4 compatible code?
Asked
Active
Viewed 398 times
0
-
A solution (although you might have reasons for not wanting to do this) is to not convert the ui file to code, but load the ui files dynamically at run time through `PyQt4.uic.loadUi()`. That would require modifying the projects you have though, so perhaps not something you want to do. – three_pineapples May 14 '17 at 23:49
2 Answers
1
In your Python virtual environment, run
python -m PyQt4.uic.pyuic
followed by the standard options and arguments you would usually pass to pyuic4

three_pineapples
- 11,579
- 5
- 38
- 75
0
PyQt5
is not compatibile with PyQt4
, hence pyuic5
is also not backward compatible.
You can install pyqt4-dev-tools
package on a debian based system which includes the pyuic4
utility

Sapnesh Naik
- 11,011
- 7
- 63
- 98
-
I'm currently on windows 10. Is there no workaround, even if I have both pyQt versions installed on different environments? – MisterTea May 14 '17 at 15:43
-
@MisterTea I'm sorry I don't know any other alternative solution for Windows – Sapnesh Naik May 14 '17 at 15:45