pyqt和pycharm环境搭建

发布于:2025-02-11 ⋅ 阅读:(81) ⋅ 点赞:(0)

安装

python安装:
https://www.python.org/downloads/release/python-3913/
python3.9.13 64位(记得勾选Path环境变量)

pycharm安装:
https://www.jetbrains.com/pycharm/download/?section=windows
community免费版

换源:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set install.trusted-host mirrors.aliyun.com

安装PyQt5和PyQt5-tool

python -m pip install --upgrade pip
pip install PyQt5
pip install PyQt5-tools

配置

pycharm中创建QtDesigner,pyuic5,pyrcc5三个外部工具
Qt Designer:和Qt Creator功能一样,设计图形界面并生成.ui文件。
pyuic5:将 .ui 文件转换为 Python 代码,使你可以在 Python 中使用设计好的界面。
pyrcc5:将 .qrc 资源文件转换为 Python 代码,使得你可以在 Python 应用中使用图像、图标等资源。
在这里插入图片描述

Name:QtDesigner
Group:External Tools
Program:D:\soft\Python\Python39\Lib\site-packages\qt5_applications\Qt\bin\designer.exe
Arguments:$FileDir$\$FileName$ 
Working directory:$FileDir$
Name:pyuic5
Group:External Tools
Program:D:\softPython\Python39\Scripts\pyuic5.exe
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$FileDir$
Name:pyuic5
Group:External Tools
Program:D:\softPython\Python39\Scripts\pyrcc5.exe
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$FileDir$

在这里插入图片描述


网站公告

今日签到

点亮在社区的每一天
去签到