Adding scrollbar to list view

This commit is contained in:
Martin Gräßlin 2012-01-13 16:33:10 +01:00
parent 2fce5db7cf
commit afae882ba4

View file

@ -23,7 +23,8 @@ Item {
property alias currentIndex: listView.currentIndex
ListView {
id: listView
anchors.fill: parent
height: parent.height
width: parent.width - scrollBar.width
model: decorationModel
highlight: PlasmaComponents.Highlight {
width: listView.width - 10
@ -82,4 +83,13 @@ Item {
}
}
}
PlasmaComponents.ScrollBar {
id: scrollBar
flickableItem: listView
anchors {
right: parent.right
top: parent.top
bottom: parent.bottom
}
}
}