{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/",
  "atlas": "https://www.pystone.net/?node=pyqt-dev-resources-tools-env#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env.md",
  "context": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:pyqt-dev-resources-tools-env",
  "slug": "pyqt-dev-resources-tools-env",
  "title": "(Python Qt拆分)PyQt 开发：相关资料、工具与环境配置",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "![](assets/image 20250212221147089.png)",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "791d986744fb919a84efc627fa84e8655b1c31da7f9c45d5c0d1e237e8f31c1c",
  "assets": [
    {
      "reference": "assets/image-20250212221147089.png",
      "url": "/media/8c5ada7087b7dee9bfc8.png",
      "mediaType": "image/png",
      "contentHash": "8c5ada7087b7dee9bfc8b2e9c5b0bc4431c66b016190c52bc7dbbee1cf095ce4",
      "byteLength": 1069241,
      "width": 1600,
      "height": 840
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "(Python Qt拆分)PyQt 开发：相关资料、工具与环境配置",
      "anchor": "python-qt拆分pyqt-开发相关资料工具与环境配置",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#python-qt%E6%8B%86%E5%88%86pyqt-%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3%E8%B5%84%E6%96%99%E5%B7%A5%E5%85%B7%E4%B8%8E%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE"
    },
    {
      "depth": 2,
      "text": "1. PyQt & PySide 相关文档与教程",
      "anchor": "1-pyqt-pyside-相关文档与教程",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#1-pyqt-pyside-%E7%9B%B8%E5%85%B3%E6%96%87%E6%A1%A3%E4%B8%8E%E6%95%99%E7%A8%8B"
    },
    {
      "depth": 3,
      "text": "官方文档",
      "anchor": "官方文档",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#%E5%AE%98%E6%96%B9%E6%96%87%E6%A1%A3"
    },
    {
      "depth": 3,
      "text": "推荐教程",
      "anchor": "推荐教程",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#%E6%8E%A8%E8%8D%90%E6%95%99%E7%A8%8B"
    },
    {
      "depth": 2,
      "text": "2. PyQt & PySide6 教程与示例代码",
      "anchor": "2-pyqt-pyside6-教程与示例代码",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#2-pyqt-pyside6-%E6%95%99%E7%A8%8B%E4%B8%8E%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81"
    },
    {
      "depth": 2,
      "text": "3. PyQt / PySide6 界面美化",
      "anchor": "3-pyqt-pyside6-界面美化",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#3-pyqt-pyside6-%E7%95%8C%E9%9D%A2%E7%BE%8E%E5%8C%96"
    },
    {
      "depth": 2,
      "text": "4. PyQt / PySide6 开发工具",
      "anchor": "4-pyqt-pyside6-开发工具",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#4-pyqt-pyside6-%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7"
    },
    {
      "depth": 2,
      "text": "5. 开发环境与流程",
      "anchor": "5-开发环境与流程",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#5-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E4%B8%8E%E6%B5%81%E7%A8%8B"
    },
    {
      "depth": 3,
      "text": "1. 配置 Python 虚拟环境",
      "anchor": "1-配置-python-虚拟环境",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#1-%E9%85%8D%E7%BD%AE-python-%E8%99%9A%E6%8B%9F%E7%8E%AF%E5%A2%83"
    },
    {
      "depth": 3,
      "text": "2. 安装 PySide6",
      "anchor": "2-安装-pyside6",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#2-%E5%AE%89%E8%A3%85-pyside6"
    },
    {
      "depth": 3,
      "text": "3. 配置 Qt Designer",
      "anchor": "3-配置-qt-designer",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#3-%E9%85%8D%E7%BD%AE-qt-designer"
    },
    {
      "depth": 3,
      "text": "4. 配置 RCC 与 UIC",
      "anchor": "4-配置-rcc-与-uic",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#4-%E9%85%8D%E7%BD%AE-rcc-%E4%B8%8E-uic"
    },
    {
      "depth": 3,
      "text": "5. 打包为可执行文件",
      "anchor": "5-打包为可执行文件",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#5-%E6%89%93%E5%8C%85%E4%B8%BA%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6"
    },
    {
      "depth": 2,
      "text": "6. 参考项目",
      "anchor": "6-参考项目",
      "citation": "https://www.pystone.net/notes/pyqt-dev-resources-tools-env/#6-%E5%8F%82%E8%80%83%E9%A1%B9%E7%9B%AE"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:application-and-cloud-engineering",
      "title": "应用开发与云端工程",
      "url": "https://www.pystone.net/notes/application-and-cloud-engineering/",
      "atlas": "https://www.pystone.net/?node=application-and-cloud-engineering#knowledge-atlas",
      "label": "应用开发与云端工程",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "桌面应用开发中的“(Python Qt拆分)PyQt 开发：相关资料、工具与环境配置”导航项",
      "citation": "https://www.pystone.net/notes/application-and-cloud-engineering/#%E6%A1%8C%E9%9D%A2%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91"
    }
  ],
  "contentMarkdown": "![](assets/image-20250212221147089.png)\n\n\n# (Python Qt拆分)PyQt 开发：相关资料、工具与环境配置\n## 1. PyQt & PySide 相关文档与教程\n\n在使用 PyQt 或 PySide6 进行 GUI 开发时，官方文档和社区资源是学习的最佳途径。以下是一些重要的文档和教程：\n\n### 官方文档\n\n- **Qt 官方文档**：[Qt 迁移指南](https://doc.qt.io/qt-6/portingguide.html)\n- **Qt 维基**：[Qt Wiki](https://wiki.qt.io/Main)\n- **Qt for Python (PySide6)**：[Qt for Python 介绍](https://wiki.qt.io/Qt_for_Python)\n- **PySide6 快速上手指南**：[PySide6 官方教程](https://doc.qt.io/qtforpython-6/quickstart.html)\n\n### 推荐教程\n\n- **白月黑羽 PyQt 教程**：[PyQt 系统入门](https://www.byhy.net/tut/py/gui/qt_01/)\n- **PySide6 GUI 开发全流程（计算器示例）**：[腾讯云教程](https://cloud.tencent.com/developer/article/2334289)\n- **简言之博客 PyQt 相关教程**：[PyQt 进阶指南](https://jwt1399.top/posts/41724.html#toc-heading-1)\n\n## 2. PyQt & PySide6 教程与示例代码\n\n如果你更喜欢通过代码示例学习，以下是一些优秀的开源项目和示例代码：\n\n- **Code Editor Example**：[官方代码编辑器示例](https://doc.qt.io/qtforpython-6.2/examples/example_widgets__codeeditor.html)\n- **YoloSide (PySide6 GUI 结合 YOLOv8)**：[GitHub 项目](https://github.com/Jai-wei/YOLOv8-PySide6-GUI)\n- **PySide6 代码教程**：[PySide6 代码示例](https://github.com/muziing/PySide6-Code-Tutorial)\n- **PyQt Fluent Widgets**：[PyQt Fluent 组件库](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)\n- **Top 19 Python 桌面应用项目**：[Python 桌面应用合集](https://www.libhunt.com/l/python/topic/desktop-app)\n\n## 3. PyQt / PySide6 界面美化\n\nQt 提供了强大的界面自定义功能，以下是一些实用的 UI 主题和样式库：\n\n- **Qt-Material**（Material Design 主题）：[官方文档](https://qt-material.readthedocs.io/en/latest/index.html#qt-material)\n- **QDarkStyleSheet**（黑暗风格样式表）：[GitHub 项目](https://github.com/ColinDuquesnoy/QDarkStyleSheet)\n- **PyQt5 Stylesheets**：[PyQt5 样式表](https://github.com/RedFalsh/PyQt5_stylesheets)\n- **Custom Widgets（PyQt 自定义控件）**：[PyQt 自定义控件库](https://github.com/PyQt5/CustomWidgets)\n\n## 4. PyQt / PySide6 开发工具\n\n在 PyQt / PySide6 的开发过程中，有许多工具可以提高效率：\n\n- **QtAwesome**（支持 FontAwesome 图标）：[GitHub 项目](https://github.com/spyder-ide/qtawesome)\n- **PyQtDarkTheme**：[PyQt 黑暗主题](https://github.com/5yutan5/PyQtDarkTheme)\n- **PyQt-PySide 自定义控件库**：[GitHub 项目](https://github.com/KhamisiKibet/QT-PyQt-PySide-Custom-Widgets)\n\n## 5. 开发环境与流程\n\n在开始 PyQt 开发之前，需要先配置好开发环境。\n\n### 1. 配置 Python 虚拟环境\n\n```sh\npython -m venv venv\nsource venv/bin/activate  # Mac/Linux\nvenv\\Scripts\\activate  # Windows\n```\n\n### 2. 安装 PySide6\n\n```sh\npip install pyside6==6.3.2\n```\n\n### 3. 配置 Qt Designer\n\nQt Designer 是 Qt 官方提供的可视化 UI 设计工具，需要进行额外配置以支持 PyQt / PySide6。\n\n### 4. 配置 RCC 与 UIC\n\nQt 资源文件（.qrc）和 UI 文件（.ui）需要转换为 Python 代码，可通过 `pyside6-uic` 和 `pyside6-rcc` 进行转换。\n\n```sh\n## 生成 UI 文件的 Python 代码\nD:\\...\\venv\\Scripts\\pyside6-uic.exe $FileName$ -o $FileNameWithoutAllExtensions$.py\n\n## 生成 RCC 资源文件的 Python 代码\nD:\\...\\venv\\Scripts\\pyside6-rcc.exe $FileName$ -o $FileNameWithoutAllExtensions$_rc.py\n```\n\n### 5. 打包为可执行文件\n\n```sh\npip install pyinstaller auto-py-to-exe\n```\n\n`auto-py-to-exe` 是 `pyinstaller` 的 GUI 封装工具，使用方法简单：\n\n1. 运行 `auto-py-to-exe`\n2. 选择 Python 入口文件\n3. 选择是否单文件、是否包含外部资源\n4. 生成 `.exe` 可执行文件\n\n## 6. 参考项目\n\n以下是一些使用 PyQt / PySide6 开发的优秀开源项目，可以参考其架构和实现方式：\n\n- **pyQode（Python 代码编辑器）**：[GitHub 项目](https://github.com/pyQode/pyQode)\n- **Frog（任务管理器）**：[GitHub 项目](https://github.com/TenderOwl/Frog/tree/master)\n- **Reflex（桌面应用框架）**：[GitHub 项目](https://github.com/reflex-dev/reflex/tree/main)\n- **Spyder IDE**（Python 科学计算 IDE）：[GitHub 项目](https://github.com/spyder-ide/spyder)\n- **OpenShot（视频编辑软件）**：[GitHub 项目](https://github.com/OpenShot/openshot-qt)\n- **Orange（数据可视化工具）**：[GitHub 项目](https://github.com/biolab/orange3)\n\n---\n\n以上是 PyQt / PySide6 开发相关的资料、工具和环境配置指南。后续我可以继续整理 PyQt 开发流程、界面设计、信号槽机制等内容，欢迎持续关注！\n"
}
