qtcompose
Build Qt applications in a reactive, declarative, and composable way.
qtcompose lets you describe your UI as a tree of components whose properties are driven by reactive values. Update state and the UI updates automatically.
[!WARNING] This project is under active development. APIs and behavior may change quickly, and documentation is still in progress. Feedback and early experimentation are welcome.
Installation
pip install qtcompose
You’ll also need a Qt binding. The examples use PySide6.
pip install PySide6
Quick example
A small counter app where the label updates automatically when count changes:
from PySide6 import QtWidgets
from qtcompose.rx import Subject, fn
from qtcompose.ui import (
QBoxLayoutItem,
QLabel,
QMainWindow,
QPushButton,
QVBoxLayout,
QWidget,
)
app = QtWidgets.QApplication()
count = Subject(0)
window = QMainWindow(
children=Subject(
QWidget(
layout=Subject(
QVBoxLayout(
children=Subject(
[
QBoxLayoutItem.Child(
QLabel(
text=fn.pipe(
count,
fn.map_(lambda cnt: f"Count: {cnt}")
)
)
),
QBoxLayoutItem.Child(
QPushButton(
text=Subject("Click Me!"),
on_click=Subject(
lambda _: count.push(
lambda prev: prev + 1
)
),
)
),
]
)
)
)
)
)
)()
window.show()
app.exec()
Further reading
For a deeper explanation of the ideas behind this project, check out my blog post:
Metadata
Release files for qtcompose 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qtcompose-0.2.0.tar.gz | 22.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qtcompose-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.8 kB
Release files / qtcompose-0.2.0.tar.gz
| Download URL | qtcompose-0.2.0.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24320438c1e948d46902e9b7f9eadbfe78f4f3177fa497b3c8601c7ffc7780d7
|
|
BLAKE2b-256 checksum How to use checksums |
440127d24155958cc6f334988df16057caf6394229824ed7190da1559acf4d30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / qtcompose-0.2.0-py3-none-any.whl
| Download URL | qtcompose-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
219beb259445009ea2e4f13d24c546c0fe9e09776a05a6ebe382e79f7379d1a4
|
|
BLAKE2b-256 checksum How to use checksums |
0e55bedaee097a117b30c49e2f7bdff1ef115c1d8b938d34f4c7e7fc8048c4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency log