NumberAnimation QML Type
큐리얼 타입 값의 변화를 애니메이션으로 표현합니다. 더 보기...
Import Statement: | import QtQuick |
Inherits: | |
Inherited By: |
프로퍼티
상세 설명
숫자 애니메이션은 숫자 값이 변경될 때 적용할 애니메이션을 정의하는 특수한 PropertyAnimation 입니다.
다음은 Rectangle 의 x
프로퍼티에 프로퍼티 값 소스로 적용된 NumberAnimation입니다. 이 애니메이션은 x
값을 현재 값에서 50으로 1000밀리초 이상 애니메이션합니다:
import QtQuick Rectangle { width: 100; height: 100 color: "red" NumberAnimation on x { to: 50; duration: 1000 } }
다른 애니메이션 유형과 마찬가지로 숫자 애니메이션은 트랜지션, 동작 및 속성 값 소스 등 다양한 방식으로 적용할 수 있습니다. 애니메이션 및 전환 문서( 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 의 애니메이션 및 전환을참조하세요 .
to : real |
이 속성은 애니메이션의 종료 값을 보유합니다.
NumberAnimation 가 Transition 또는 Behavior 내에 정의된 경우 이 값은 Transition 의 종료 상태 또는 Behavior 를 트리거한 속성 변경 값에 정의된 값으로 기본값이 지정됩니다.
Qt Quick 의 애니메이션 및 전환을참조하세요 .
© 2025 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.