나는 (지속 시간보다는) 속도를 지정하고 어떤 루프가 영원히 반복되는지 애니메이션으로 조합하려고합니다. 나는이 비 작동 예를 내놓았다 :QML 애니메이션 "속도"와 무한 "루프"모두
FirstTry.qml에게
import Qt 4.7
Rectangle {
width: 100; height: 100
Text {
text: "hello"
NumberAnimation on x {
to: 50;
loops: Animation.Infinite;
duration: 50 * Math.abs(to - from)
}
}
}
hello
가 (공평) 화면에 너트가는 동안 나는 다음과 같은 런타임 경고를을.
QDeclarativeExpression: Expression "(function() { return 50 * Math.abs(to - from) })" depends on non-NOTIFYable properties:
QDeclarativeNumberAnimation::to
QDeclarativeNumberAnimation::from
SecondTry.qml
import Qt 4.7
Rectangle {
width: 100; height: 100
Text {
text: "hello"
SmoothedAnimation on x {
to: 50;
loops: Animation.Infinite;
velocity: 50
}
}
}
이것은 신비의 더 - SmoothedAnimation
단순히 루프에 거부! 애니메이션이 한 번 실행되면 그게 전부입니다. 첫 번째 예에서 속도를 지정하는 법적 방법
있습니까 :
그래서 나는 다음과 같은 질문이? 나는 이 NumberAnimation
에서 파생 된 것을 이해합니다. C++뿐만 아니라 QML에서도 가능합니다.
루프가 만들 수 있습니까? SmoothedAnimation
루프가 있습니까? 두 번째 예제가 버그를 작동시키지 않습니까? 아니면 뭔가 빠져 있습니까?
동시에이 두 가지 동작을 수행 할 수있는 다른 방법이 있습니까?