Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.7.3
-
None
-
Symbian
-
52187b084491641ef80536c743c2261af8bfe11c
Description
ListView with huge amount of elemens and limited highlightMoveDuration can crash an application if it is scrolled by changing of currentIndex. To reproduce a bug, one can execute a following code in QML application (e.g. generated by qtcreator 2.0). Change an orientation during the random scrolling can "help" to crash the application.
import QtQuick 1.0 Item { // width: 300 // height: 600 ListModel { id: playlist } ListView { id: listview anchors.fill: parent model: playlist delegate: playlistDelegate highlightMoveDuration: 500 } Rectangle { id: button width: 100; height: 50 color: "green" anchors.bottom: parent.bottom MouseArea { anchors.fill: parent onClicked: listview.currentIndex = Math.random() * (listview.count - 1) } Text { anchors.centerIn: parent text: "Go random" } } Component { id: playlistDelegate Item { height: 75 width: listview.width Row { Text { text: index + 1 + "." color: "green" } Text { text: " " + num color: "green" } } } } Component.onCompleted: { for (var i = 0; i < 50000; i++) playlist.append({"num": Math.random(), "num1": Math.random(), "num2": Math.random(), "num3": Math.random(), "num4": Math.random(), "num5": Math.random(), "num6": Math.random(), "num7": Math.random()}) } }