이 페이지에서

Easing QML Type (Singleton)

간편한 열거형 및 편의 API에 대한 액세스를 제공합니다. 더 보기...

Import Statement: import QtQml
Since: Qt 6.11

참고: 이 유형은 QML 싱글톤입니다. QML 엔진에는 이 유형의 인스턴스가 하나만 있습니다.

상세 설명

Easing 싱글톤은 일반적으로 animations 에서 사용하는 Easing 열거형에 대한 액세스를 제공합니다. 또한 valueForProgress 함수를 편의 API로 제공합니다:

    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)
        }
    }

이 함수의 목표는 주어진 커브를 따라 값을 완화하는 편리한 방법을 제공하는 것입니다. 고급 커브의 경우 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.