[SailfishDevel] Bug in Page component?

Fedor Zaitsev best.zaytsev at gmail.com
Thu Apr 23 08:54:28 UTC 2015


Hi. Today I found that standard PropertyAnimation element behavior unexpectedly. Take a look that code:
import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
    Rectangle {
        id: rect
        width: 400
        height: 400
        color: "red"
    
        MouseArea {
            anchors.fill: parent
            onClicked: anim.start()
        }
    
        PropertyAnimation {
            id: anim
            target: rect
            property: "color"
            to: "green"
            duration: 2000
            running: false
        }
    
        Timer {
            id: timer
            repeat: true
            running: true
        }
    }
}

There is an animation that starts when we click at our rectangle and simple timer that do nothing. If you start that code you will see that animation working incorrectly - it just jumps to the green color and finish. However if you comment Timer element you will see correct animation.
Looks like that this is a Page component bug, because if you put this code in ApplicationWindow element everything works correctly and also there is no such bug in Qt 5.3


More information about the Devel mailing list