Qt 3D:缓动可用于动画吗?

问题描述

我正在检查 Qt 6.0.1 的 3D 功能。我复制了一个示例项目,但它给出了 "easing" does not have memberseasing.type :Easing.InQuad错误: 这是代码

            SequentialAnimation on y {
                loops: Animation.Infinite
                NumberAnimation {
                    duration: 3000
                    to: -150
                    from: 150
                    easing.type :Easing.InQuad
                }
                NumberAnimation {
                    duration: 3000
                    to: 150
                    from: -150
                    easing.type :Easing.OutQuad
                }
            }

Easing does not have members - error in qml

为什么会发生这种情况?这是否意味着建议的示例不起作用?

解决方法

我过去太相信IDE了。

这确实是来自 IDE 的误报。代码运行良好,动画似乎正确。

此问题可能已关闭。