如何把.prc资源文件转换成.py文件

 蓝色智慧 发表于 2022年01月01日 软件编程  105
蓝色智慧
LV 7 [大学]
最后在线:13天前
加入时间:2年前
主帖:233  跟帖:5

在Python编程中使用PyQt,用QtDeshiner创建的资源文件(.prc)需要转换成 .py 文件才能使用的,通常是用命令行完成的,在pycharm里可以用外部工具功能快捷完居转换。

pycharm配置方法:

1、打开pycharm后点击File菜单下的settings……项。

2、在弹出的窗口中找到Tools→External Tools,点开后点击“+”号。

3、在弹出的 Edit Tool 窗口中填写配置项。


 Name: 输入自己好记的功能名称

Program: 填写pyrcc5.exe所在的地址。 (如:C:\Program Files\Python39-32\Scripts\pyrcc5.exe)

Arguments:填写参数:$FileName$ -o $FileNameWithoutExtension$.py

Working directory:  $FileDir$ ,表示 .prc 所在的文件夹。

4、使用方法:


 在pycharm的文件列表中找到.prc 文件,点击鼠标右键,依次选择 External Tools → Qrc To Py (可以自己命名),即可在源文件同目录下生成一个新的扩展名 .py 的同名文件。

论坛主帖
234
论坛跟帖
2
在线访客
1
今日主帖
0
今日跟帖
0
今日注册
0
252
http://76w.net/sq/index.php/gentie.html
http://76w.net/sq/index.php/postzan.html
http://76w.net/sq/index.php/postcai.html
http://76w.net/sq/index.php/postshoucang.html
http://76w.net/sq/index.php/gentiezan.html
http://76w.net/sq/index.php/gentiecai.html
http://76w.net/sq/index.php/huifu.html
http://76w.net/sq/index.php/xiugai.html
http://76w.net/sq/index.php/shanchugentie.html
1
XzA=
1
© 2023 天慧网·互动社区 版权所有
Powered by JianYuLunTan
蒙ICP备2021000971号-1
http://76w.net/sq/index.php/feedback.html
http://76w.net/sq/index.php/qiandao.html
http://76w.net/sq/index.php/denglu.html
0
http://76w.net/sq/index.php/adenglu.html
剑鱼论坛