QT设计师预览python代码
安装
测试环境:win10,PyQt版本如下(其它版本可自行测试):
- PyQt5==5.11.3
- pyqt5-tools==5.11.3.1.4
测试
首次运行报错
在C:\Program Files\Python37\Lib\site-packages\pyqt5_tools
中双击designer.exe,新建窗体:
点击Form>>View Code…,报错如下:
测试uic.exe
在C:\Program Files\Python37\Lib\site-packages\pyqt5_tools
中可找到uic.exe
,新建bin
文件夹,复制uic.exe
到bin
目录,测试(可以预览C++代码):
测试pyuic5.exe
在C:\Program Files\Python37\Scripts
中找到pyuic5.exe
,复制到C:\Program Files\Python37\Lib\site-packages\pyqt5_tools\bin
中,并重命名为uic.exe
,测试(可以预览python代码):