首页| 论坛| 消息

标题:又遇到一个QML的Animation问题了……
作者:彩阳
日期:2014-06-01 01:07
内容:

我遇到一个非常奇怪的问题,QML的Behavior on x在Android上不可用,桌面上可用,而NumberAnimation on x在桌面上不可用,Android上可用。这究竟是怎么一回事呢?


#1 [彩阳 06-20 21:39]
问题再详细描述一下吧:
就像下面的代码那样:
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
& ..
#2 [彩阳 06-26 21:15]
Qt 5.3.1就没有这个问题了。
#3 [foruok 07-04 09:44]
mark一下。

回复 发表
主题 版块