Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.0.0, 5.4.0 Beta
-
None
Description
Run the following code.
Once 6 new items are added and the "original 1" item moves out of the ListView area, it starts jumping between the bottom of the view and its correct position. It should have been set to visible=false once it moved out of view, even if it's the current item. (The jumping doesn't occur if view transitions are not enabled.)
The "original 1" item also jumps out of the view, instead of animating smoothly out of view. This is more obvious when you set clip=true and see the moment that it moves out of view.
import QtQuick 2.0 Item { width: 320; height: 480 Timer { interval: 500; running: true; repeat: true onTriggered: model.insert(0, { "name": "Item " + model.count }) } Rectangle { anchors.fill: listView color: "red" opacity: 0.1 } ListView { id: listView width: 240; height: 200 model: ListModel { id: model ListElement{name:"original 1"} ListElement{name:"original 2"} } delegate: Rectangle { width: 100; height: 30 border.width: 1 color: "lightsteelblue" Text { anchors.centerIn: parent text: name } } add: Transition { NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 } NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 } } addDisplaced: Transition { NumberAnimation { properties: "x,y"; duration: 400; easing.type: Easing.OutBounce } } focus: true Keys.onReturnPressed: timer.stop() } }