Commit ae736f9f authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Use ListSectionHeader in ListView example

Test Plan: {F8225962}

Reviewers: #kirigami, ngraham

Reviewed By: #kirigami, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma, #kirigami

Differential Revision: https://phabricator.kde.org/D28685
parent 1889f311
......@@ -20,7 +20,7 @@
import QtQuick 2.4
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0 as Controls
import org.kde.kirigami 2.5 as Kirigami
import org.kde.kirigami 2.10 as Kirigami
Kirigami.ScrollablePage {
id: page
......@@ -126,7 +126,8 @@ Kirigami.ScrollablePage {
for (var i = 0; i < 200; ++i) {
listModel.append({"title": "Item " + i,
"actions": [{text: "Action 1", icon: "document-decrypt"},
{text: "Action 2", icon: "mail-reply-sender"}]
{text: "Action 2", icon: "mail-reply-sender"}],
"sec": Math.floor(i/10)
})
}
}
......@@ -141,5 +142,11 @@ Kirigami.ScrollablePage {
width: parent ? parent.width : implicitWidth
sourceComponent: delegateComponent
}
section {
property: "sec"
delegate: Kirigami.ListSectionHeader {
text: "Section " + (parseInt(section) + 1)
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment