安装pyqt5
安装
1.安装pyqt5
pip3 install PyQt5 -i https://pypi.douban.com/simple
2.安装pyqt5-tools
pip3 install PyQt5-tools -i https://pypi.douban.com/simple
可能会报错:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
qt5-tools 5.15.2.1.2 requires click~=7.0, but you'll have click 8.1.2 which is incompatible.
解决办法:
后面加上--use-feature=2020-resolver
配置
setting-tools-external tools点加号
1.QtDesigner
name:Qt Designer
project:/home/用户名/anaconda3/envs/虚拟环境名/lib/python3.8/site-packages/qt5_applications/Qt/bin/designer(windos加后缀.exe) (你的designer.exe路径)
Arguments:不用填
Working Directory: $ProjectFileDir$
2.PyUIC
name:PyUIC
program:/home/用户名/anaconda3/envs/虚拟环境名/bin/python(windos加后缀.exe) (你的python.exe路径)
Arguments:-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
Working Directory:$FileDir$

浙公网安备 33010602011771号