PyQt5 Project Manager
Build a desktop project management application using PyQt5 with multiple synchronized views for tracking tasks and milestones.
What This Skill Does
Creates a Python desktop application with:
Editable Project Tree view for hierarchical task organizationRead-only Gantt Chart for timeline visualizationRead-only Calendar view for date-based planningRead-only Timeline view for milestone trackingView switching via toolbar or menuComplete project scaffolding and documentationInstructions
Step 1: Clarify Project Requirements
Before starting, confirm with the user:
Target platform (Windows, macOS, Linux, or cross-platform)Required features beyond basic views (export, persistence, etc.)Data model requirements (task properties, dependencies, etc.)UI preferences (dark mode, theming, layout)Step 2: Scaffold the Project
Create the project structure:
```
project_name/
├── main.py # Application entry point
├── views/
│ ├── __init__.py
│ ├── project_tree.py # Editable tree view
│ ├── gantt_chart.py # Read-only Gantt
│ ├── calendar_view.py # Read-only calendar
│ └── timeline_view.py # Read-only timeline
├── models/
│ ├── __init__.py
│ └── project_data.py # Data model
├── utils/
│ ├── __init__.py
│ └── helpers.py # Utility functions
├── requirements.txt
└── README.md
```
Generate `requirements.txt`:
```
PyQt5>=5.15.0
```
Step 3: Create Main Window
In `main.py`, implement:
QMainWindow with central widgetQStackedWidget for view switchingQToolBar or QMenuBar for navigationSignal/slot connections for view changesInstantiate all views and add to stacked widgetStep 4: Implement Project Tree View
In `views/project_tree.py`:
Use QTreeWidget or QTreeView with custom modelEnable editing for task names, dates, propertiesImplement add/remove/reorder functionalityEmit signals when data changes to update other viewsStep 5: Implement Read-Only Views
For `views/gantt_chart.py`, `views/calendar_view.py`, `views/timeline_view.py`:
Use QGraphicsView or custom QWidget paintingSubscribe to data change signals from tree viewRender visual representation (bars, calendar cells, timeline markers)Disable user editing but allow zooming/panning where appropriateStep 6: Create Data Model
In `models/project_data.py`:
Define Task/Project classes or data structuresImplement data persistence (JSON, SQLite, or in-memory)Provide methods for CRUD operationsEmit signals on data changesStep 7: Compile and Test
Install dependencies: `pip install -r requirements.txt`Run application: `python main.py`Test view switching and data synchronizationVerify tree editing updates all viewsStep 8: Create Documentation
Generate `README.md` with:
Project description and featuresInstallation instructionsUsage guide with screenshotsDevelopment setupOptional: export settings (paper size, orientation, margins)Testing instructionsStep 9: Optional Enhancements
If requested by user:
Add export dialog for print/PDF with paper size/orientation/marginsImplement file save/load functionalityAdd task filtering and searchCreate unit tests in `tests/` directoryAdd CI/CD configurationExample Usage
When user requests: "Create a PyQt5 project manager with Gantt chart"
1. Confirm requirements using Step 1 questions
2. Scaffold complete project structure (Step 2)
3. Implement main window with view switching (Step 3)
4. Build editable project tree (Step 4)
5. Create synchronized read-only views (Step 5-6)
6. Generate documentation (Step 8)
7. Verify compilation and provide run instructions (Step 7)
Constraints
Use PyQt5 (not PyQt6 or PySide) unless user specifies otherwiseKeep read-only views truly read-only to prevent data inconsistenciesEnsure all views stay synchronized via signal/slot mechanismFollow PyQt5 best practices for threading and event handlingNo VS Code extensions required for this workflowSuccess Criteria
Application launches without errorsTree view allows editing and updates propagate to all viewsAll four views display synchronized data correctlyREADME.md contains complete setup and usage instructionsCode is modular and follows Python/PyQt5 conventions