Create links to PyQt5 and Qt Creator in PyCharm

本文介绍如何在PyCharm中配置PyQt5,包括设置外部工具pyrcc5和pyuic5,以及Qt5 Designer,以便进行PyQt应用程序开发。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

By default PyCharm only links to PyQt4. In order to enjoy PyQt5 for building a PyQt Application,

we have to do some extra setting work in PyCharm,

1. Open File>Settings>Tools>External Tools

2. Clicking "+" and add one external tool, such as pyrcc5, and input following parameters

    1) Name: pyrcc5; Group: PyQt5; Description: empty is oK.

    2) leave Options and "show in" as they are

    3) Program: /usr/bin/pyrcc5 (if you don't know, run `which pyrcc5` in a console)

        Parameters: $FileName$ -o $FileNameWithoutExtension$_rc.py (try clocking "insert macro")

        Working directory: $FileDir$ (choose it from macros)

    4) click OK then this tool is OK when activate context menu for *.qrc file (Shown as PyQt5> pyrcc)

3. In the same way, we can add pyuic5 and Qt5 Designer (Program: /usr/bin/designer)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值