User header instead of columnlayout to better add widgets to top of listview.

This commit is contained in:
2020-07-23 14:48:51 -04:00
parent edb48c6802
commit 51d3945c0b

View File

@@ -272,23 +272,26 @@ Kirigami.ApplicationWindow {
router.pushRoute({"route": "addrecord", "data": serviceId}); router.pushRoute({"route": "addrecord", "data": serviceId});
} }
} }
/*Layouts.ColumnLayout { ListView {
anchors.fill: parent id: serviceView
Layouts.Layout.fillHeight: true
Layouts.Layout.fillWidth: true
model: recordModel
headerPositioning: ListView.OverlayHeader
header: Kirigami.ListSectionHeader {
z: 9997
contentItem: Layouts.ColumnLayout {
Kirigami.InlineMessage { Kirigami.InlineMessage {
Layouts.Layout.fillWidth: true Layouts.Layout.fillWidth: true
Layouts.Layout.leftMargin: 10
Layouts.Layout.rightMargin: 10
z: 9997
type: Kirigami.MessageType.Information type: Kirigami.MessageType.Information
id: oilMessage id: oilMessage
showCloseButton: false showCloseButton: false
Component.onCompleted: { Component.onCompleted: {
//TODO: check if oil change is needed. //TODO: check if oil change is needed.
} }
}*/ }
ListView { }
id: serviceView }
model: recordModel
delegate: Kirigami.SwipeListItem { delegate: Kirigami.SwipeListItem {
contentItem: Layouts.ColumnLayout { contentItem: Layouts.ColumnLayout {
Kirigami.Heading { Kirigami.Heading {
@@ -327,7 +330,6 @@ Kirigami.ApplicationWindow {
] ]
} }
} }
//}
} }
} }
} }