Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 1.0
- Rectangle {
- width: 450
- height: 300
- Component {
- id: highlight
- Rectangle {
- width: 180; height: 40
- color: "lightsteelblue"; radius: 5
- y: list.currentItem.y
- Behavior on y {
- SpringAnimation {
- spring: 3
- damping: 0.2
- }
- }
- }
- }
- ListView {
- id: list
- width: parent.width; height: 200
- model: 6
- orientation: ListView.Horizontal
- delegate: Rectangle {
- border.width: 1
- width: 150
- // height: 40
- Text { text: model.index }
- Keys.onDownPressed: {
- list.currentIndex += 3
- }
- }
- highlight: highlight
- highlightFollowsCurrentItem: true
- focus: true
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement