[Qt-qml] QML: RotationAnimation fails to start

Stephen Collyer scollyer at netspinner.co.uk
Mon Jul 19 19:22:55 CEST 2010


I have some QML like so:

Item
{
..
    MouseArea
    {
        anchors.fill: parent
        onClicked: rot.start
    }

    Text
    {
        id: goodbye
        text: "Goodbye"
        color: "red"
        anchors.horizontalCenter: page.horizontalCenter
        anchors.verticalCenter: page.verticalCenter
        rotation: 0

        RotationAnimation on rotation
        {
            id: rot
            running: false
            from: 0
            to: 365
            duration: 1000
        }
    }
}

When I click on the Item, the RotationAnimation does not start.
I have verified that the MouseArea responds to mouse clicks,
and that the animation itself operates correctly. I have also tried
referring to RotationAnimation as goodbye.rot, but I can't get
the animation to start.

Can anyone see the problem ?

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100719/b84ff6c4/attachment.html 


More information about the Qt-qml mailing list