Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
de8daddf8823213eb8312e3a404e7a499b5e5011
Description
Run the code below in qml.exe
import Qt 4.7 Item { width: 360 height: 600 ListView { id: listView anchors.fill: parent model: testModel delegate: listItemDelegate focus: true } ListModel { id: testModel ListElement { } ListElement { } ListElement { } } Component { id: listItemDelegate Rectangle { id: listItem width: listView.width height: 100 states: State { name: "expanded" PropertyChanges { target: listItem; height: 150 } } transitions: [ Transition { NumberAnimation { target: listItem; properties: "height"; duration: 1000 } } ] gradient: Gradient { GradientStop { position: 0.0; color: "#cccccc"; } GradientStop { position: 1.0; color: "#000000"; } } state: listItem.ListView.isCurrentItem ? "expanded" : ""; } } }
When switching between the first and second item with up / down arrow keys, you can see the third one jittering up and down one pixel. Are the two delegates animated with separate timers or is it just a rounding error?
As this will probably be (QML will triumph of course ) a very common thing people will want to do there should be at least good documentation on how to implement such a list where the active and previously active item expands and contracts at the same time without jittering.