# 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**: 3 - **Forks**: 3 - **Created**: 2025-04-11 - **Last Updated**: 2025-09-13 ## 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 组件(按钮、输入框、表格等) - 🛠️ 模块化架构,轻松扩展自定义组件 - 📱 响应式布局适配不同分辨率 --- #### 技术栈 - **编程语言**: Python 3.10.9 - **GUI 框架**: PySide6 6.4.3 - **依赖管理**: pip --- #### 快速开始 ##### 环境配置 1. 克隆仓库 ```bash git clone https://gitee.com/shilianlvke/CustomGUI.git cd CustomGUI ``` 2. 创建虚拟环境 ```bash # Windows python -m venv .venv # Linux/macOS python3 -m venv .venv ``` 3. 激活虚拟环境 ```bash # Windows PowerShell .\.venv\Scripts\Activate # Linux/macOS source .venv/bin/activate ``` 4. 安装依赖 ```bash pip install -r requirements.txt ``` ##### 运行示例 ```bash python main.py ``` --- #### 应用打包 使用 [auto-py-to-exe](https://github.com/brentvollebregt/auto-py-to-exe) 生成独立可执行文件: 1. 安装打包工具 ```bash pip install auto-py-to-exe ``` 2. 启动图形化打包向导 ```bash auto-py-to-exe ``` **打包配置建议**: • 选择 `main.py` 作为主脚本 • 启用 `One Directory` 打包模式 • 添加 `ui` 和 `themes` 目录到附加文件 --- #### 开发指南 1. **项目结构** ``` CustomGUI/ ├── AppCore/ # 程序核心 ├── GUICore/ # UI 核心组件库 ├── GUI/ # UI 界面基础框架 ├── res/ # 配置文件/资源 ├── main.py # 主入口 └── requirements.txt # 依赖清单 ``` 2. **自定义主题** 修改 `res\SYS\themes` 中的颜色配置,或新增配置文件,参考示例代码:res\SYS\themes\default.yml 和 res\loading_config.yml 3. **扩展组件** 参考示例代码: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),请自由使用并保留原始作者信息。