Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0, 4.7.1
-
None
-
9c70c81e6af2435d8d8217b81714b2e087326ecf
Description
This is a weird issue, possibly related to Flickable. Took us long to isolate.
Steps to reproduce:
- Launch the code below in qmlviewer.exe
- Use the mouse wheel to scroll the list. Notice how fast it scrolls. Here, we are getting top speeds around 700 px/s
- click on any item in the list and drag and drop it somewhere. Doesn't matter where/
- Now scroll with the mouse wheel again and notice that it is scrolling much slower. Our top speed now is around 150 px/s
- If you click anywhere, the scrolling speed is fast again. It seems that this somehow "releases" the drag.
import Qt 4.7 Rectangle { width: 200 height: 200 ListView { id: list anchors.fill: parent model: 300 delegate: Text { text: index MouseArea { anchors.fill: parent drag.target: dragTarget } } } Item { id: dragTarget } // Just for debugging: show the scrolling speed. Removing this won't affect the problem Text { property int topSpeed: max(list.verticalVelocity) function max(s) { s = Math.abs(s) return (s > 0) ? Math.max(topSpeed, s) : 0; //nevermind the binding loop here, only for debugging purposes } anchors {top: parent.top; right: parent.right} horizontalAlignment: Text.AlignRight text: "Speed: " + Math.round(list.verticalVelocity) + " pixels/s \n Top: " + topSpeed } }