1.安装库
pip3 install PyQt5
pip3 install PyQt5-tools
2.安装VScode的插件
3.配置PyQt插件
把designer.exe的路径填入下面的框框
一般为:
Python的根目录+Lib\site-packages\pyqt5_tools\Qt\bin\designer.exe
或者Python的根目录+Lib\site-packages\pyqt5_tools\designer.exe
或者Python的根目录+Scripts\pyqt5designer.exe
4.使用方法
右键UI文件,即可:1.新建新的ui窗口 2.预览当前ui效果 3.编辑当前ui文件 4编译ui文件