"PUI" Python Declarative UI Framework
Project description
Install
pip install QPUIQ
Example
Code
import PUI
PUI.BACKEND = "PySide6"
from PUI import State
from PUI.generic import *
data = State()
class Example(Window):
def __init__(self):
super().__init__(title="blah", size=(640,480))
data.var = 50
def content(self):
with VBox():
with Canvas():
CanvasText(data.var, data.var/2, f"blah {data.var}")
CanvasLine(data.var, data.var, data.var*2, data.var*3)
with HBox():
Button("-", self.on_minus)
Label(f"{data.var}")
Button("+", self.on_plus)
def on_minus(self):
data.var -= 1
def on_plus(self):
data.var += 1
root = Example()
root.run()
UI
DOM
Example {
QtVBox {
QtCanvas {
QtCanvasText {
},
QtCanvasLine {
}
},
QtHBox {
QtButton {
},
QtLabel {
},
QtButton {
}
}
}
}
More Example
See examples/*.py
Progress
- State
Update TriggerBinding- List/Dict and Lazy UI
- Verify Nested View
- Adapters
- Split Application/Window
LabelButtonTextField- Layout
HBoxVBox- ZBox
- Grid
- Row
- Column
- Canvas
TextLine- Rect
- Arc
- Image
- ...
- Table
- Tree
- Scrollbar
- Better DOM syncer
- Prevent unnecessary nested update
- Trace Event Source (TextField) and prevent udpate it DOM Sync
- update() -> sync()/inflate()/update()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
QPUIQ-0.1.2.tar.gz
(9.8 kB
view hashes)