Pycharm配置Qtdesigner、PyUIC

一:安装PyQt5

1.首先就是pip安装PyQt5:

pip install PyQt5

2.然后需要安装Qt工具,也选择pip安装:

pip install PyQt5-tools

按

二:添加QtDesigner和PyUIC

1.file->settings

file

2.tools->external tools->+

aaa

3.添加QtDesigner

safaf

(根据自己的路径进行配置)

program:
D:\ProgramData\Anaconda3\Library\bin\designer.exe

working directory:
D:\ProgramData\Anaconda3\Library\bin

4.添加PyUIC

在这里插入图片描述

program:
D:\ProgramData\Anaconda3\envs\tf1.15\python.exe

arguments:
-m
PyQt5.uic.pyuic
$FileName$
-o
$FileNameWithoutExtension$.py
working directory:$FileDir$

5.apply->ok

asdd

至此,配置完成。
如何将.ui文件转成.py文件?
选中想要转换的ui文件,右击,external tools->PyUIC

tools

猜你喜欢

转载自blog.csdn.net/weixin_52051554/article/details/125594360