Easing QML Type (Singleton)
이징 열거형 및 편의 API에 대한 액세스를 제공합니다. 더 보기...
| Import Statement: | import QtQml |
| Since: | Qt 6.11 |
참고: 이 유형은 QML 싱글톤입니다. QML 엔진 내에는 이 유형의 인스턴스가 단 하나만 존재합니다.
상세 설명
Easing 싱글톤은 일반적으로 ` animations`에서 사용되는 ` Easing ` 열거형에 대한 액세스를 제공합니다. 또한 편의 API로 ` valueForProgress ` 함수를 제공합니다:
Rectangle {
id: rect
width: 100
height: 100
anchors.centerIn: parent
color: "red"
opacity: 0
}
FrameAnimation {
id: frameAnimation
running: true
property real elapsed // In seconds.
readonly property real duration: 2 // Two seconds.
onTriggered: {
elapsed += frameTime
// Loop once we reach the duration.
if (elapsed > duration)
elapsed = 0
// Increase the opacity from 0 slowly at first, then quickly.
rect.opacity = Easing.valueForProgress(Easing.InQuart, elapsed / duration)
}
}이 함수의 목적은 주어진 곡선을 따라 값을 이즈(ease) 처리하는 편리한 방법을 제공하는 것입니다. 더 복잡한 곡선을 사용하려면 easingCurve 값 유형을 사용하십시오.
© 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.