Skip to content

StandardListView

import { StandardListView, VerticalBox } from "std-widgets.slint";
export component Example inherits Window {
width: 200px;
height: 200px;
VerticalBox {
StandardListView {
model: [ { text: "Blue"}, { text: "Red" }, { text: "Green" },
{ text: "Yellow" }, { text: "Black"}, { text: "White"},
{ text: "Magenta" }, { text: "Cyan" },
];
}
}
}
slint
std-widgets standardlistview example

Like ListView, but with a default delegate, and a model property.

Same as ListView, and in addition:

int (in-out) default: 0

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

struct StandardListViewItem default: a struct with all default values

StandardListViewItem

Represents an item in a StandardListView and a StandardTableView.

  • text (string): The text content of the item

The model.

StandardListView {
model: [{ text: "Blue" }, { text: "Red" }, { text: "Green" }];
}
slint

Sets the current item by the specified index and brings it into view.

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

StandardListView {
model: [{ text: "Blue" }, { text: "Red" }, { text: "Green" }];
current-item-changed(index) => {
debug("Current item: ", index);
}
}
slint

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

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

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


© 2025 SixtyFPS GmbH