Generic | PySide6 | flet | tkinter | textual |
---|---|---|---|---|
Application | QApplication | Page | Tk | App |
Window | QMainWindow | ✓(Single) | Toplevel | ✓(Single) |
HBox | QHBoxLayout | Row | Frame(grid) | Horizontal |
VBox | QVBoxLayout | Column | Frame(grid) | Vertical |
Spacer | QSpacerItem | ✓ | ✓ | ✓ |
Label | QLabel | Text | Label | Label/Button |
Button | QPushButton | ElevatedButton | Button | Button |
Checkbox | QCheckBox | Checkbox | Checkbutton | Checkbox |
RadioButton | QRadioButton | Radio | Radiobutton | RadioButton |
Canvas | ✓(QWidget) | Canvas | Canvas | - |
TextField | QLineEdit | TextField | Entry | Input |
ProgressBar | QProgressBar | ProgressBar | Progressbar | ProgressBar |
Scroll | QScrollArea | ✓ | ✓ | ScrollableContainer |
Text | QLabel | Text | Label | Text |
Html | QLabel | ⚠ Text | ⚠ Label | ⚠ Text |
MarkDown | QLabel | Markdown | ⚠ Label | Markdown |
Combobox | QComboBox | - | - | - |
ComboboxItem | ✓ | - | - | - |
Table | QTableView | - | - | - |
Tabs | QTabWidget | Tabs | Notebook | Tabs |
Tab | ✓ | Tab | ✓ | ✓ |
MenuBar | QMenuBar | - | - | - |
Menu | QMenu | - | - | - |
MenuAction | QAction | - | - | - |
MdiArea | QMdiArea | - | - | - |
MdiSubWindow | QMdiSubWindow | - | - | - |
Splitter | QSplitter | - | - | - |
Modal | ✓ | - | - | - |
(Interop) | QtInPui | - | - | - |
(Interop) | PuiInQt | - | - | - |
Generic | PySide6 | flet | tkinter | textual |
---|---|---|---|---|
OpenDirectory | QFileDialog.getExistingDirectory | - | - | - |
OpenFile | QFileDialog.getOpenFileName | - | - | - |
OpenFiles | QFileDialog.getOpenFileNames | - | - | - |
SaveFile | QFileDialog.getSaveFileName | - | - | - |
Information | QMessageBox | - | - | - |
Warning | QMessageBox | - | - | - |
Critical | QMessageBox | - | - | - |
Confirm | QMessageBox | - | - | - |
Prompt | QInputDialog | - | - | - |
- .layout(width=320, height=240, weight=1, padding=, margin=)
- .style(color=0xFF0000, bgColor=0x0, fontSize=16, fontWeight="bold", fontFamily="Arial")
- .qt(HorizontalPolicy=, VerticalPolicy=, SizeConstraint=, StyleSheet={})
- .flet(k=v)
Top level element of an application
Application()
flet and textual backends only support single window
Window([title=str][,size=(w,h)][,maximize=bool][,fullscreen=bool])
Modal window
Modal(model[,offValue=None][,title=str][,size=(w,h)][,maximize=bool][,fullscreen=bool])
Horizontal Linear Layout Container
HBox()
Vertical Linear Layout Container
VBox()
Spacer inside linear layout containers
with HBox():
Text("Left")
Spacer()
Text("Right")
Scrollable container
with Scroll().layout(weight=1).scrollY(Scroll.END):
with VBox():
for i in range(100):
Label(f"Row {i+1}")
Single line clickable text with button appearance
Button(text).click(callback, *cb_args, **cb_kwargs)
Single line clickable text
Label(text).click(callback, *cb_args, **cb_kwargs)
Multiple line text viewer
Text(text)
HTML viewer (only supported by PySide6 backend)
Html(html)
Markdown viewer (not supported by tkinter backend)
Markdown(md)
Single line text editor
TextField(binding)
Linear progress indicator
ProgressBar(progress `0-1`)
Checkbox(label, model)
RadioButton(label, value, model)
def painter(canvas):
canvas.drawText(x, y, text)
canvas.drawLine(x1, y1, x2, y2, color=0xFF0000, width=2)
canvas.drawPolyline([x1, y2, ..., xn, yn], color=0xFF0000, width=2)
Canvas(painter)
Table widget
Table(adapter)
Wrapper for embedding native widget instance into PUI
Currently only supported by PySide6 backend
Wrapper for embedding PUI view into existing QT view hierarchy
Currently only supported by PySide6 backend