Lists and pages
Page
A scrolling page with a header. Sub-pages set back: true and get a back arrow (hidden on TV, where Back does it).
Page {
title: @tr("display.title");
back: true;
go-back => { Backend.page = 0; }
ListGroup { … }
}
title, subtitle, back, back-key (Back/Esc goes back even without the arrow); go-back().
ListGroup
A rounded group of rows with an optional title above and footer text below.
ListRow
The workhorse of settings-style screens: one row, the whole row is the target.
ListRow {
title: @tr("wifi.title");
subtitle: Backend.wifi-name;
icon: Icon.wifi;
trailing: chevron;
clicked => { … }
}
| Property | |
|---|---|
title, subtitle, subtitle-color | |
icon, icon-color | leading icon |
trailing | none, chevron (opens a page), switch, value (text on the right), check, radio, busy (spinner) |
value | the text for trailing: value |
checked | for switch, check, radio |
selected | highlighted (the current sidebar entry) |
danger | red title |
divider | line below (default true; the last row of a group sets false) |
preview-on-focus | a sidebar: fires previewed() when the focus rests on the row |
clicked(), toggled(bool), previewed() |
ControlRow
A row with a title (and optional value text) and your own control below it (a Segmented, a Slider) as its
child; divider.
PageHeader
The header of Page on its own: title, subtitle, back; go-back().
Scroller
A Flickable that stops scrolling while another gesture holds the screen (Gesture.held). Page already contains one.