Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.4
-
50924bd8557db9a398f3c1ccdd6996d968658b23
Description
The example below demonstrates.
Control: Slowly drag between 1 and 2 and release at various points – when the drag is released, we snap to the closest item.
Issue 1: Slowly drag between 0 and 1 and release at various points – it is very difficult to get it to snap to 0.
Issue 2: Slowly drag between 2 and 3 and release at various points – it is heavily weighted towards 3 (it is hard to go from 3 to 2).
import QtQuick 2.0 Item { width: 400 height: 400 ListView { anchors.fill: parent preferredHighlightBegin: 100 preferredHighlightEnd: 100 highlightRangeMode: ListView.StrictlyEnforceRange model: ListModel { ListElement { section: "1" } ListElement { section: "1" } ListElement { section: "1" } ListElement { section: "2" } ListElement { section: "2" } ListElement { section: "2" } ListElement { section: "3" } ListElement { section: "3" } ListElement { section: "3" } ListElement { section: "4" } ListElement { section: "4" } ListElement { section: "4" } ListElement { section: "5" } ListElement { section: "5" } ListElement { section: "5" } ListElement { section: "6" } ListElement { section: "6" } ListElement { section: "6" } } delegate: Rectangle { width: parent.width height: 50 color: index % 2 ? "lightsteelblue" : "steelblue" Text { anchors.centerIn: parent color: "white" text: model.index } } section.property: "section" section.delegate: Rectangle { width: parent.width height: 50 color: "green" Text { anchors.centerIn: parent color: "white" text: "section" } } highlight: Rectangle { y: 100 z: 2 width: parent.width height: 50 color: "#80FF0000" } } }