Files
GenericQMLApp/ListPage.qml

63 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls.Material
Page {
id: page
ListView {
id: listView
anchors.fill: parent
focus: true
clip: true
model: mainModel
delegate: ListItemDelegate {}
highlight: Rectangle {
color: wccLavenderDefault
radius: 5
}
header: bannercomponent
footer: Rectangle {
width: parent.width
height: 30
gradient: mainGradient
}
}
Component {
//instantiated when header is processed
id: bannercomponent
Rectangle {
id: banner
width: parent.width
height: 50
gradient: mainGradient
border {
color: wccPurpleDark
width: 2
}
Text {
anchors.centerIn: parent
text: window.title
font.pixelSize: 32
color: wccDarkLight
}
}
}
Gradient {
id: mainGradient
GradientStop {
position: 0.0
color: wccPurpleDefault
}
GradientStop {
position: 0.66
color: wccPurpleDark
}
}
}