pyqt5–ui文件转py: pip install pyqt5-tools pyuic5 demo.ui -o demo.py # or python -m PyQt5.uic.pyuic demo.ui -o demo.py