List rendering finally works!

This commit is contained in:
2022-04-01 11:12:11 -07:00
parent 67e87e9731
commit 58b32a6cb3
4 changed files with 96 additions and 8 deletions

View File

@@ -23,7 +23,38 @@ Kirigami.ApplicationWindow {
onTriggered: addAirport.open()
}
}
Kirigami.CardsListView {
anchors.fill: parent
id: cardLayout
model: logic.metarList
delegate: metarListDelegate
}
}
Component {
id: metarListDelegate
Kirigami.AbstractCard {
contentItem: Item {
implicitWidth: delegateLayout.implicitWidth
implicitHeight: delegateLayout.implicitHeight
RowLayout {
id: delegateLayout
anchors {
left: parent.left
top: parent.top
right: parent.right
}
Kirigami.Heading {
text: flightCategory
}
Controls.Label {
text: rawMetar
}
}
}
}
}
Kirigami.OverlaySheet {
id: addAirport