Win + R输入cmd打开命令提示符
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ PyQt5
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ PyQt5-tools
搜素pyqt integration 安装


找到 Pyqt-integration ? Pyuic: Cmd 确认内容为 pyuic5

找到 Pyqt-integration ? Pyuic ? Compile: Filepath 确认内容为

打开文件管理器,搜索designer.exe 复制路径加上\designer.exe
D:\Python3.9.6\Lib\site-packages\qt5_applications\Qt\bin\designer.exe

创建UI文件:在文件夹右键:PYQT: New Form

编译UI文件:PYQT:compile from
编译产生的py文件名和ui文件名对应

编译产生的py文件中的类名和designer中objectName名对应


原文:https://www.cnblogs.com/peachaw520/p/15173909.html