QT Designer
launch
Designer.app 位置:
/Users/swot/opt/anaconda3/bin/Designer.app
pycharm 启动 Designer.app
- Preferences -> Tools -> External Tools -> Add
-
启动方式:
- 右键 --> External Tools --> QTDesigner
- 菜单Tools --> External Tools --> QTDesigner
注意: 需要重启pycharm才能生效
ui2py
方法一: 直接使用python
python -m PyQt5.uic.pyuic -o demo.ui demo.py
方法二: 使用pyuic5
pyuic5 demo.ui -o demo.py
/Users/swot/opt/anaconda3/pkgs/pyqt-5.9.2-py37h655552a_2/bin/pyuic5
方法三: 使用pycharm
- Program:
/Users/swot/opt/anaconda3/bin/python
- Arguments:
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
- Working directory:
$FileDir
$
注意: 需要重启pycharm才能生效
网友评论