Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0 Alpha
-
None
-
e44843bfc8fc8bfd5c987fde08816ec3d81f0cae
Description
The following example demonstrates the issue. Click the black button to see the view jump before smoothly transitioning. Changing the highlightRangeMode to NoHighlightRange or StrictlyEnforceRange fixes the issue.
import QtQuick 2.0 GridView { id: gridView width: 400; height: 400 cellHeight: height/ 3 cellWidth: width / 5 model: 30 topMargin: 50 snapMode: GridView.SnapToRow preferredHighlightBegin: 50 preferredHighlightEnd: 50 highlightRangeMode: GridView.ApplyRange delegate: Rectangle { width: gridView.cellWidth height: gridView.cellHeight color: index % 3 == 0 ? "#00FF00" : index % 2 == 0 ? "#FFFF00" : "#0000FF" } highlight: Rectangle { color: "red"; z: 2 } highlightMoveDuration: 1000 Rectangle { id: scrollbar y: gridView.visibleArea.yPosition * gridView.height width: 10 height: gridView.visibleArea.heightRatio * gridView.height color: "black" } Rectangle { width: 50; height: 50 color: "black" anchors.right: parent.right anchors.bottom: parent.bottom MouseArea { anchors.fill: parent onClicked: gridView.currentIndex = gridView.currentIndex + 5 } } }