pyqt-reactive
React-quality reactive form generation framework for PyQt6
Overview
pyqt-reactive is a Python framework for generating reactive, data-driven forms from dataclass definitions. It provides a clean, type-safe way to create PyQt6 user interfaces with automatic widget generation, theming, and animation support.
Key Features
Dataclass-Driven Forms: Automatically generate UI forms from Python dataclasses
Widget Protocol System: Type-safe widget adapters with consistent interfaces
Reactive Updates: Field change dispatcher for cross-widget updates
Theming System:
ColorScheme-based styling
StyleSheetGenerator for consistent appearance
PaletteManager for dynamic theme switching
Animation System:
Flash animations for value changes
OpenGL-accelerated overlays
Performance-optimized rendering
Service Architecture: Clean separation of UI and business logic
Cross-Window Coordination: Window manager for multi-window applications
Installation
pip install pyqt-reactive
Quick Example
from dataclasses import dataclass
from PyQt6.QtWidgets import QApplication
from pyqt_reactive.forms import ParameterFormManager
@dataclass
class ProcessingConfig:
input_path: str = ""
output_path: str = ""
num_workers: int = 4
enable_gpu: bool = False
app = QApplication([])
form = ParameterFormManager(ProcessingConfig)
form.show()
# Get values back
config = form.collect_values()
app.exec()
Requirements
Python 3.11+
PyQt6 >= 6.4.0
objectstate >= 0.1.0
Contents
Architecture
Widgets & Components
Animation & Performance
Development
API Reference