NumberAnimation QML Type
qreal형 값의 변화를 애니메이션으로 표현합니다. 더 보기...
| Import Statement: | import QtQuick |
| Inherits: | |
| Inherited By: |
속성
상세 설명
NumberAnimation은 숫자 값이 변경될 때 적용될 애니메이션을 정의하는 특수한 PropertyAnimation 입니다.
다음은 ` Rectangle `의 ` x ` 속성에 속성 값 소스로 적용된 `NumberAnimation`의 예시입니다. 이 애니메이션은 ` x ` 값을 현재 값에서 50으로, 1000밀리초에 걸쳐 애니메이션 처리합니다:
import QtQuick
Rectangle {
width: 100; height: 100
color: "red"
NumberAnimation on x { to: 50; duration: 1000 }
}다른 애니메이션 유형과 마찬가지로, NumberAnimation도 전환, 동작 및 속성 값 소스 등 다양한 방식으로 적용할 수 있습니다. ' Qt Quick 의 애니메이션 및 전환' 문서에서는 애니메이션을 생성하는 다양한 방법을 보여줍니다.
NumberAnimation은 추적하는 숫자 값에 불규칙한 변화가 있는 경우 애니메이션이 부드럽게 재생되지 않을 수 있습니다. 이 경우 대신 SmoothedAnimation 를 사용하십시오.
‘ Qt Quick 의 애니메이션 및 전환 ’ 및 ‘Qt Quick 예제 - 애니메이션’도 참조하십시오 .
속성 설명서
from : real
이 속성은 애니메이션의 시작 값을 지정합니다.
예를 들어, 다음 애니메이션은 x 값이 100에 도달할 때까지는 적용되지 않습니다:
Item {
states: [
// ...
]
transitions: Transition {
NumberAnimation { properties: "x"; from: 100; duration: 200 }
}
}NumberAnimation 가 Transition 또는 Behavior 내에서 정의된 경우, 이 값은 기본적으로 Transition 의 시작 상태에 정의된 값이나, Behavior 이 트리거되는 시점의 속성 현재 값으로 설정됩니다.
Qt Quick 의 ‘애니메이션 및 전환(Animation and Transitions)’항목도 참조하십시오 .
to : real
이 속성은 애니메이션의 종료 값을 저장합니다.
NumberAnimation 가 Transition 또는 Behavior 내에서 정의된 경우, 이 값은 기본적으로 Transition 의 종료 상태에 정의된 값이나 Behavior 를 트리거한 속성 변경의 값으로 설정됩니다.
Qt Quick 의 ‘애니메이션 및 전환(Animation and Transitions)’항목도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.