Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.0.0, 5.0.1, 5.5.1
-
Windows, Linux, Android
Description
The code works well when Qt 4 (QtQuick 1.1).
It’s like an advertising column.
import QtQuick 2.0 Rectangle { id: desktop width: 1258 height: 697 color: "red" ListModel { id: ads_model ListElement { color: "green" } ListElement { color: "blue" } ListElement { color: "yellow" } } PathView { id: path_view anchors.fill: parent model: ads_model delegate: Rectangle { id: homepage_game width: 878; height: 405 z: 2 + index / 10 scale: PathView.scale color: model.color } focus: true preferredHighlightBegin: 0.5 preferredHighlightEnd: 0.5 flickDeceleration: 380 path: Path { startX: 180 - (ads_model.count - 1) * 440; startY: 280 PathAttribute { name: "scale"; value: 0.618 } PathLine { x: desktop.width / 2; y: 280 } PathAttribute { name: "scale"; value: 1.0 } PathLine { x: desktop.width - 180 + (ads_model.count - 1) * 440; y: 280 } } } }
There are 3 rectangles that can be horizontally dragged. Whenever releasing the mouse, the rectangle flicks to the left or right (according to its position)
Normally, it works well. But occasionally there’s a problem:
I try to drag a rectangle to such a position, that about half of this rectangle can be seen ( the other half is clipped by the window ), then the rectangle moves to the destination position at a very low speed. At other positions, the rectangle moves at a obviously different speed.
This position is not easy to be found so the ‘low speed situation’ is not easy to reproduce. I can reproduce it after trying about 5 times. The ‘slow’ is quite obvious compared to the normal situation.
When I’m using Qt4, there’s no such situation.
And I also tried the examples. examples\quick\views\pathview\pathview-example.qml (QtQuick2) also has the same problem. Because the items in the examples is smaller so the issue is not so obvious and hard to reproduce (10 times +), I suggest you to test my code, not the example.
examples\declarative\modelviews\pathview\qml\pathview-example\pathview-example.qml (QtQuick1) has no such problem.
I'm on WinXP.
Attachments
Issue Links
- is duplicated by
-
QTBUG-34817 PathView flick can be very slow - cannot change minimumFlickVelocity
- Closed