List rendering finally works!
This commit is contained in:
31
main.qml
31
main.qml
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user