pyqt和pycharm环境搭建

安装

python安装:

https://www.python.org/downloads/release/python-3913/

python3.9.13 64位(记得勾选Path环境变量)

pycharm安装:

https://www.jetbrains.com/pycharm/download/?section=windows

community免费版

换源:

bash 复制代码
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

bash 复制代码
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 应用中使用图像、图标等资源。

bash 复制代码
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$
bash 复制代码
Name:pyuic5
Group:External Tools
Program:D:\softPython\Python39\Scripts\pyuic5.exe
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$FileDir$
bash 复制代码
Name:pyuic5
Group:External Tools
Program:D:\softPython\Python39\Scripts\pyrcc5.exe
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$FileDir$
相关推荐
2601_967980111 天前
世界上最好的Python编辑器是什么?我投PyCharm一票
ide·python·pycharm·数据科学·jupyter notebook
承渊政道2 天前
【Python编程—从入门到实践】(记分与闯关:用Python+Pygame,打造越战越精彩的太空大战!)
开发语言·python·pycharm·游戏程序·pygame
拼图2093 天前
VSCode 正则表达式使用指南
ide·vscode·正则表达式
#六脉神剑4 天前
myBuilder 11 月新版本:AI辅助设计
ide·人工智能·低代码·ai·mybuilder
小李不困还能学4 天前
VSCode_RemoteSSH_一直卡在下载服务器_解决教程
服务器·ide·vscode
独隅5 天前
WebStorm macOS 安装部署与高效调优完全指南
ide·macos·webstorm
独隅6 天前
WebStorm macOS 安装调优与实战效能全景
ide·macos·webstorm
独隅6 天前
WebStorm Linux 版安装实战与核心效能展示
linux·ide·webstorm
独隅7 天前
WebStorm 在 Linux 环境下的实战安装与高效开发指南
linux·ide·webstorm
modelmd7 天前
离线安装与使用 vscode Remote SSH插件
ide·vscode·ssh