# CustomGUI **Repository Path**: shilianlvke/CustomGUI ## Basic Information - **Project Name**: CustomGUI - **Description**: 使用QT for Python 打造的一个通用GUI - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 7 - **Created**: 2025-04-11 - **Last Updated**: 2026-02-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: PySide6, Python, UI, CustomGUI, PyQt ## README # CustomGUI #### 简介 一个基于 PySide6 构建的现代化通用 GUI 框架,提供高度可定制的界面组件和模块化设计。项目灵感来源于开源项目 [PyOneDark_Qt_Widgets_Modern_GUI](https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI) ,并在此基础上进行了功能增强和易用性优化。 ![image](ReadMeRes/概览.png) **核心特性**: - 🎨 内置暗色/亮色主题切换 - 📦 预置现代化 UI 组件(按钮、输入框、表格等) - 🛠️ 模块化架构,轻松扩展自定义组件 - 📱 响应式布局适配不同分辨率 - 默认黑暗主题:default ![image](ReadMeRes/默认主题.png) - 明亮主题:bright ![image](ReadMeRes/明亮主题.png) - 护眼主题:eye ![image](ReadMeRes/护眼主题.png) - 梦幻主题:dracula ![image](ReadMeRes/梦幻主题.png) --- #### 技术栈 - **编程语言**: Python >= 3.12 - **GUI 框架**: PySide6 >= 6.10 - **依赖管理**: uv ``` 详情可查看pyproject.toml ``` --- #### 快速开始 ##### 环境配置 1. 克隆仓库 ```bash git clone https://gitee.com/shilianlvke/CustomGUI.git cd CustomGUI ``` 2. 创建虚拟环境和安装依赖 ```bash # Windows PowerShell(项目路径下) 1. uv python install 3.12 2. uv venv 3. uv init ``` 3. 激活虚拟环境 ```bash # Windows PowerShell(项目路径下) .\.venv\Scripts\Activate ``` ##### 运行示例 ```bash uv python main.py ``` --- #### 应用打包 使用 [auto-py-to-exe](https://github.com/brentvollebregt/auto-py-to-exe) 生成独立可执行文件: 1. 安装打包工具 ```bash uv add auto-py-to-exe ``` 2. 启动图形化打包向导(激活环境后) ```bash auto-py-to-exe ``` **打包配置建议**: • 选择 `main.py` 作为主脚本 • 启用 `One Directory` 打包模式 • 添加 `ui` 和 `themes` 目录到附加文件 --- #### 开发指南 1. **项目结构** ``` CustomGUI/ ├── AppCore/ # 程序核心 ├── GuiCore/ # UI 核心组件库 ├── GUI/ # UI 界面基础框架 ├── resource/ # 配置文件/资源 ├── main.py # 主入口 └── pyproject.toml # 项目配置信息 ``` 2. **自定义主题** 修改 `resource\custom_ui\themes` 中的颜色配置,或新增配置文件,参考示例代码:resource\custom_ui\themes\default.yml 和 resource\loading_config.yml 3. **扩展组件** 参考示例代码: ``` GuiCore\customui\ GuiCore\widgets\ ``` --- #### 参与贡献 欢迎通过 Issue 和 PR 参与项目开发,流程如下: 1. Fork 本仓库 2. 创建功能分支 (`git checkout -b feature/AmazingFeature`) 3. 提交代码 (`git commit -m 'Add some AmazingFeature'`) 4. 推送分支 (`git push origin feature/AmazingFeature`) 5. 发起 Pull Request 请确保代码符合 [PEP8](https://peps.python.org/pep-0008/) 规范,并通过 `pylint` 代码检查。 --- #### 许可证 本项目采用 [MIT License](LICENSE),请自由使用并保留原始作者信息。 #### 代码分支 ``` master: 主分支-稳定版本 develop:开发分支-最新 ```