aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/quickcontrols2/contactlist/MainForm.ui.qml4
-rw-r--r--examples/quickcontrols2/contactlist/SectionDelegate.ui.qml25
2 files changed, 8 insertions, 21 deletions
diff --git a/examples/quickcontrols2/contactlist/MainForm.ui.qml b/examples/quickcontrols2/contactlist/MainForm.ui.qml
index fdc6dd91..1639ecc8 100644
--- a/examples/quickcontrols2/contactlist/MainForm.ui.qml
+++ b/examples/quickcontrols2/contactlist/MainForm.ui.qml
@@ -69,11 +69,11 @@ Page {
focus: true
anchors.fill: parent
- section.criteria: ViewSection.FirstCharacter
- section.property: "fullName"
snapMode: ListView.SnapToItem
boundsBehavior: Flickable.StopAtBounds
+ section.property: "fullName"
+ section.criteria: ViewSection.FirstCharacter
section.delegate: SectionDelegate {
width: listView.width
}
diff --git a/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml b/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml
index 3b9f7dc5..fa64ffbf 100644
--- a/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml
+++ b/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml
@@ -51,27 +51,14 @@
import QtQuick 2.7
import QtQuick.Controls 2.1
-Rectangle {
- height: 20
- width: 120
- gradient: Gradient {
- GradientStop {
- position: 0
- color: "#dddddd"
- }
-
- GradientStop {
- position: 1
- color: "blue"
- }
- }
+ToolBar {
+ id: background
Label {
- x: 12
- color: "white"
+ id: label
text: section
- style: Text.Raised
- font.pixelSize: 18
- font.bold: true
+ anchors.fill: parent
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
}
}