Metadata-Version: 2.4
Name: qxui
Version: 1.0.0
Summary: An XML-based reactive-declarative native UI framework built on Qt.
Author: Xylen
License-Expression: LGPL-3.0-only
Project-URL: Repository, https://github.com/debxylen/qxui
Project-URL: Issues, https://github.com/debxylen/qxui/issues
Keywords: qt,qt5,qt6,xml,qml,pyside6,gui,ui
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6>=6.5.0
Dynamic: license-file

# QXUI

An XML-based reactive-declarative native UI framework built on Qt/QML.

```bash
pip install qxui # or: pip install git+https://github.com/debxylen/qxui
```

### how it works

- **compiler**: raw-translates declarative XML UI into QML
- **profiles**: extends capabilities by acting as a layout engine, along with basic styling, etc
- **runtime**: provides a nice api to manage and create apps/windows, reactive states, actions, etc

### quick example

```xml
<!-- ui.xml -->
<_ xmlns="urn:qxui:schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:qxui:schema https://raw.githubusercontent.com/debxylen/qxui/main/schema.xsd">

    <Item padding="24" gap="16" background.color="#0f172a">
        <Text color="white" font.weight="Font.Bold" font.pixelSize="20">
            Clicks: {clicks}
        </Text>

        <Button onClick="increment"> increment </Button>
    </Item>

</_>
```

```python
from qxui import App, State

with open("ui.xml", "r", encoding="utf-8") as f:
    ui = f.read()

state = State({"clicks": 0})
app = App(state)

@app.action("increment")
def click_handler(ctx):
    ctx.set_state("clicks", ctx.state["clicks"] + 1)

app.create_window(ui, title="cool app", size=(400, 300))
app.run()
```

more at [examples](examples/); more to be added

### license

[LGPL v3.0](LICENSE)
