A Python Qt 6 application demonstrating a Service + ViewModel architecture with QML frontend.
The Qt Telemetry Dashboard is a small desktop application built with PySide6 (Qt for Python) and QML. It demonstrates:
- Service + ViewModel architecture (MVVM)
- Signal-driven UI updates
- Python-based Qt development workflow
- Unit testing of Qt signals and ViewModels
- Clean separation of concerns between UI and logic
The app simulates real-time telemetry by generating random sensor data (speed, temperature, battery) and displays it in a responsive QML dashboard.
- Real-time telemetry simulation
- Reactive updates via signals
- MVVM pattern: services provide data, ViewModels expose it to QML
- Unit-tested Python code, including:
- Signal emission
- ViewModel property updates
- Data integrity
- QML UI displaying sensor data in a clean dashboard layout
qt-python-app/
├── app/
│ ├── main.py # Application entry point
│ ├── services/
│ │ └── telemetry_service.py # Generates sensor data and emits signals
│ ├── viewmodels/
│ │ ├── dashboard_vm.py # Connects service data to QML
│ │ └── sensor_vm.py # Wraps individual sensor data
│ ├── models/
│ │ └── sensor_data.py # SensorData and SensorStatus definitions
│ └── ui/
│ ├── Main.qml # Dashboard UI
│ └── components
│ ├── SensorRow.qml
│ └── StatusIndicator.qml
├── tests/
│ ├── test_telemetry_service.py
│ ├── test_dashboard_vm.py
│ └── test_sensor_vm.py
├── pyproject.toml
├── README.md
└── .gitignoreTelemetryService → DashboardViewModel → QML UITelemetryServicegenerates data and emits a signal.DashboardViewModellistens to the service signal and updatesSensorViewModels.- QML binds to the ViewModels for dynamic UI updates.
- Python 3.10+
- PySide6
- pytest (for unit tests)
Install dependencies:
pip install PySide6 pytestRun as a module (recommended for correct imports):
python -m app.mainRunning python app/main.py directly may break imports due to package structure.
pytest -vAll tests include signal emission checks using QSignalSpy and validate ViewModel behavior.