이 페이지에서

easingCurve QML Value Type

이완 곡선을 나타내는 값입니다. 더 보기...

Import Statement: import QtQml
Since: Qt 6.11

상세 설명

easingCurve 유형은 이즈링 곡선( easing curve)을 정의하는 속성을 가진 값입니다:

  • enumeration type
  • real amplitude
  • real overshoot
  • real period
  • list<real> bezierCurve

예를 들어, ` FrameAnimation`를 사용하여 사용자 정의 애니메이션을 만들 때나, 주어진 곡선을 따라 값을 이징해야 하는 모든 경우에 유용합니다.

easingCurve 값을 생성하려면 이징 유형을 할당합니다:

        readonly property easingCurve inQuartCurve: 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 inQuartCurve: 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 는 ` structured value ` 유형이므로 JavaScript 객체를 사용하여 생성할 수 있습니다:

    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.