pip install PyQt5
pip install pyqt5-tools
点击PyCharm的File->Settings->Tools->External tools
填入如下信息
name:
Qt Designer
program:
E:\anaconda3\envs\python37\Lib\site-packages\PySide2\designer.exe
(执行pip install pyqt5-tools的虚拟环境里的Lib\\site-packages\PySide2中找designer.exe)
Working directory:
$FileDir$
同理创建pyUIC
name:
Qt Designer
program:
E:\anaconda3\envs\python37\python.exe
(执行pip install pyqt5-tools的虚拟环境里的python.exe)
Arguments:
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.