easingCurve QML Value Type
완화 곡선을 나타내는 값입니다. 더 보기...
| Since: | Qt 6.11 |
상세 설명
easingCurve 유형은 easing curve 을 정의하는 속성이 있는 값입니다:
enumeration typereal amplitudereal overshootreal periodlist<real> bezierCurve
예를 들어 FrameAnimation 를 사용하여 사용자 지정 애니메이션을 만들 때 또는 주어진 커브를 따라 값을 완화해야 하는 사용 사례에 유용합니다.
easingCurve 값을 만들려면 QtQml (또는 QtQuick)을 네임스페이스로 가져옵니다:
import QtQml as QtQml
그런 다음 new 를 사용하여 인스턴스를 만듭니다:
readonly property easingCurve easingCurve: Easing.InQuart
다음 예제는 Easing 문서에 설명된 것과 유사합니다:
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. readonly property easingCurve easingCurve: Easing.InQuart 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 = inQuartCurve.valueForProgress(elapsed / duration) } }
구조화된 값 유형 구문을 통해 easingCurve 을 생성할 수도 있습니다:
readonly property easingCurve inElasticCurve: ({ type: Easing.InElastic, amplitude: 4, period: 3 })
C++와 통합할 때, C++에서 QML로 전달된 QEasingCurve 값은 자동으로 easingCurve 값으로 변환된다는 점에 유의하세요. easingCurve 값이 C++로 전달되면 QEasingCurve 값으로 자동 변환됩니다.
기본으로 구성된 easingCurve 은 new QtQml.easingCurve(QtQml.Easing.Linear) 과 같습니다.
QML 값 유형도참조하세요 .
© 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.