Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
26ec7d7e407fd1b55f69d63833a3ee8af4479d85
Description
In the example below the behavior on Y has no effect and the behavior on the ListView does nothing. However clicking the mouse area later does work. So maybe the Behavior is not taking effect yet before the Component.onCompleted fires?
import QtQuick 2.0 Item { width: 300 height: 600 property bool listToggle: true // Make list animate right away, except the Behavior does not seem to exist yet. Component.onCompleted: { list.y = 0; } ListView { id: list y: 600 Behavior on y { NumberAnimation { duration: 3000} } width: 300 height: 600 model: 100 delegate: Rectangle { width: 300 height: 100 color: index % 2 ? "grey" : "lightgrey" } } // Test to see if Behavior works later, which it does MouseArea { anchors.fill: parent onClicked: { listToggle ? list.y = 600 : list.y = 0; listToggle = !listToggle; } } }