• 4381阅读
  • 3回复

[提问]又遇到一个QML的Animation问题了…… [复制链接]

上一主题 下一主题
离线彩阳
 

只看楼主 倒序阅读 楼主  发表于: 2014-06-01
我遇到一个非常奇怪的问题,QML的Behavior on x在Android上不可用,桌面上可用,而NumberAnimation on x在桌面上不可用,Android上可用。这究竟是怎么一回事呢?
上海Qt开发联盟,热忱地欢迎你的加入!
离线彩阳

只看该作者 1楼 发表于: 2014-06-20
问题再详细描述一下吧:
就像下面的代码那样:
    Image
    {
        id: animateCapsule
        height: parent.width / 10
        width: height / 2
        property int xFrom: parent.width + height * 8
        property int xTo: -height * 2
        x: xFrom
        y: parent.height * 0.45
        source: "../../images/capsule.png"

        RotationAnimation on rotation
        {
            from: 0
            to: 360
            loops: Animation.Infinite
            duration: 2000
        }

        //@ 桌面:请注意使用这一段代码
        Behavior on x
        {
            NumberAnimation
            {
                from: animateCapsule.xFrom
                to: animateCapsule.xTo
                loops: Animation.Infinite
                duration: 2000
            }
        }

        //@ 安卓:请注意使用这一段代码
//        NumberAnimation on x
//        {
//            from: animateCapsule.xFrom
//            to: animateCapsule.xTo
//            loops: Animation.Infinite
//            duration: 2000
//        }
    }

Qt的Bug已提

上海Qt开发联盟,热忱地欢迎你的加入!
离线彩阳

只看该作者 2楼 发表于: 2014-06-26
Qt 5.3.1就没有这个问题了。
上海Qt开发联盟,热忱地欢迎你的加入!
离线foruok

只看该作者 3楼 发表于: 2014-07-04
mark一下。
我的博客:http://blog.csdn.net/foruok
我的微信订阅号:程序视界
快速回复
限100 字节
 
上一个 下一个