多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
- 安装PyQt5,推荐直接下载whl的二进制包进行安装 >https://pypi.org/project/PyQt5/#files - 安装QtDesigner >https://pypi.org/project/pyqt5-tools/5.9.0.1.2/#files - 添加系统环境变量, `最好先在真实环境装一遍 方便添加环境变量` >QT\_QPA\_PLATFORM\_PLUGIN\_PATH >C:\Program Files\Python36\Lib\site-packages\PyQt5\Qt\plugins - 配置PyCharm >QtDesigner >C:\Program Files\Python36\Lib\site-packages\pyqt5-tools\designer.exe >$FileDir$ ![](https://box.kancloud.cn/3b1da283019b880b21ef8adb802960d6_1026x712.png) - 设置“PyUIC” >PyUIC >C:\Program Files\Python36\python.exe >-m PyQt5.uic.pyuic  $FileName$ -o $FileNameWithoutExtension$.py >$FileDir$ ![](https://box.kancloud.cn/a5d5a289e52ca9d5ce20f01ef7e02e87_1026x712.png) - 使用PyUIC将test.ui文件转换为test.py - 生成代码后,还不能运行,因为这只是一个界面的代码 - 添加main.py,因为ui文件命名为test,所以import是test ~~~ import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QMainWindow if __name__ == '__main__': app = QApplication(sys.argv) MainWindow = QMainWindow() ui = Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_()) ~~~ >https://maicss.gitbooks.io/pyqt5/content/hello_world.html >https://www.riverbankcomputing.com/static/Docs/PyQt5/ >http://www.kuqin.com/qtdocument/index.html >http://www.xdbcb8.com