Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

adding scroll indicators to ListView

$
0
0
Something like this? import QtQuick 2.1   Row {     Rectangle {         id: prev         width: 10         height: 50         Text {             text: "<"             color: list.currentIndex > 0 ? "black" : "lightgrey"         }         MouseArea {             anchors.fill: parent             onClicked: list.currentIndex = Math.max(0, list.currentIndex - 1)         }     }       ListView {         id: list         width: 110         height: 50         orientation: ListView.Horizontal         clip: true         model: 10         delegate: Text {             text: " item " + index + " "         }     }       Rectangle {         id: next         width: 10         height: 50         Text {             text: ">"             color: list.currentIndex < list.count - 1 ? "black" : "lightgrey"         }         MouseArea {             anchors.fill: parent             onClicked: list.currentIndex = Math.min(list.count - 1, list.currentIndex + 1)         }     } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles