Skip to content

Repository files navigation

pyqt-reactive

Reactive, ObjectState-backed forms and reusable application infrastructure for PyQt6.

PyPI versionDocumentation StatusPython 3.11+

Quick start

ParameterFormManager renders an existing ObjectState. The state is the model; the form is a view over it.

fromdataclassesimportdataclassfromPyQt6.QtWidgetsimportQApplicationfromobjectstateimportObjectState, set_base_config_typefrompyqt_reactive.forms.parameter_form_managerimport (
FormManagerConfig,
ParameterFormManager,
)
frompyqt_reactive.themingimportColorScheme@dataclassclassProcessingConfig:
input_path: str=""num_workers: int=4enable_gpu: bool=Falseapp=QApplication([])
set_base_config_type(ProcessingConfig)
state=ObjectState(ProcessingConfig(), scope_id="processing")
form=ParameterFormManager(
state,
config=FormManagerConfig(color_scheme=ColorScheme()),
)
form.show()
app.exec()

Do not pass a dataclass type or instance directly to ParameterFormManager. Create ObjectState(instance) so edits, dirty tracking, hierarchy, and cross-window updates share one authority.

Ownership

pyqt-reactive owns generic widget protocols and strategies, form lifecycle, field-change dispatch, reusable services and managers, previews, animations, and window infrastructure. Host applications own domain workflows and adapters.

Installation

python -m pip install pyqt-reactive

For development:

git clone https://github.com/OpenHCSDev/PyQT-reactive.git
cd PyQT-reactive
python -m pip install -e ".[dev]"

Full documentation: pyqt-reactive.readthedocs.io

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages