Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
bd2eece4a68808c771d39cd53922ef538d0ba54d
Description
Run the code below. Note how the text change color from white to
black when flicked, and the text snaps to the center of the white
rectangle when the flicking ends.
Now comment out this
ListElement { text: "1969" }
line from the example and run the code again. Note how the text is
now always white (and thus invisible when not moving). This seems
to be because the ListView.StrictlyEnforceRange is failing, resulting
in the ListView.isCurrentItem always returning false (change the text
color to always be black to see that it doesn't snap to the center).
import QtQuick 2.0 Rectangle { ... ListModel { id: yearModel //ListElement { text: "1969" } Component.onCompleted: { for(var i = 0; i < 60; i++) append({"text": i+1970}) } } ... }