1.Listview2.0
高亮组件:必须填入listview的ID
Component {
id: highlightBar
Rectangle {
width: 200; height: 50
color: "#FFFF88"
y: listViewID.currentItem.y;
Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } }
}
}
2.代理点击(高亮条跟随必须添加此句)
ListView.view.currentIndex = index
3.这句话设置true,false 目前都可以
highlightFollowsCurrentItem: true
4.效果如下图