Skip to content

StandardTableView

The StandardTableView represents a table of data with columns and rows. Cells are organized in a model where each row is a model of

struct StandardListViewItem default: a struct with all default values

import { StandardTableView } from "std-widgets.slint";
export component Example inherits Window {
width: 230px;
height: 200px;
StandardTableView {
width: 230px;
height: 200px;
columns: [
{ title: "Header 1" },
{ title: "Header 2" },
];
rows: [
[
{ text: "Item 1" }, { text: "Item 2" },
],
[
{ text: "Item 1" }, { text: "Item 2" },
],
[
{ text: "Item 1" }, { text: "Item 2" },
]
];
}
}
slint
std-widgets standardtableview example

Same as ListView, and in addition:

int (out) default: 0

Indicates the sorted column. -1 mean no column is sorted.

[struct] (in-out) default: a struct with all default values

Defines the model of the table columns.

StandardTableView {
columns: [{ title: "Header 1" }, { title: "Header 2" }];
rows: [[{ text: "Item 1" }, { text: "Item 2" }]];
}
slint

[[struct]] (in-out) default: a struct with all default values

Defines the model of table rows.

StandardTableView {
columns: [{ title: "Header 1" }, { title: "Header 2" }];
rows: [[{ text: "Item 1" }, { text: "Item 2" }]];
}
slint

int (in-out) default: 0

The index of the currently active row. -1 mean none is selected, which is the default.

Emitted if the model should be sorted by the given column in ascending order.

Emitted if the model should be sorted by the given column in descending order.

row-pointer-event(int, PointerEvent, Point)

Section titled “row-pointer-event(int, PointerEvent, Point)”

Emitted on any mouse pointer event similar to TouchArea. Arguments are row index associated with the event, the PointerEvent itself and the mouse position within the tableview.

Emitted when the current row has changed because the user modified it

StandardTableView {
columns: [{ title: "Header 1" }, { title: "Header 2" }];
rows: [[{ text: "Item 1" }, { text: "Item 2" }]];
current-row-changed(index) => {
debug("Current row: ", index);
}
}
slint

Sets the current row by index and brings it into view.


© 2025 SixtyFPS GmbH