首先下载PyQt5和PyQt5_tools
pip install PyQt5
pip install PyQt5_tools
下载完之后在电脑中找到他们所在的位置
我的Designed位置:C:\Users\zxt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\qt5_applications\Qt\bin\designer.exe
将地址填入到这里
在这之前需要在VScode中下载PYQT integration
在该扩展的设置中可以找到上面设置路径的位置
再将pyrcc和pyuic的路径存入
我的pyuic5路径:C:\Users\zxt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\pyuic5
我的pyrcc5路径:C:\Users\zxt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\pyrcc5
设置完毕后右键python文件,如果有就说明pyqt5配置好了