Animation 如何在顺序动画中使用锚定动画?

Animation 如何在顺序动画中使用锚定动画?,animation,qml,Animation,Qml,我想在连续动画中将小部件移动到容器的中心,但它不起作用: SequentialAnimation { PauseAnimation { duration: 1000 } AnchorAnimation { duration: 1000 // ERROR: Cannot assign to non-existent default property AnchorChanges { target: widge

我想在连续动画中将小部件移动到容器的中心,但它不起作用:

SequentialAnimation {
    PauseAnimation { duration: 1000 }
    AnchorAnimation {
        duration: 1000
        //  ERROR: Cannot assign to non-existent default property 
        AnchorChanges {
            target: widget1
            anchors.horizontalCenter: container.horizontalCenter
        }
    }
....
都不是:

SequentialAnimation {
    PauseAnimation { duration: 1000 }
    // ERROR: Cannot assign object to list
    AnchorChanges {
        target: widget1
        anchors.horizontalCenter: container.horizontalCenter
    }
    AnchorAnimation {
        duration: 1000
    }
....

不能将
锚定或更改
项放入动画中。你已经把它放入了一个州定义中


有关更多详细信息,请参阅。

QML文件中的顺序动画位于何处(即,它的父项是什么?)。你能提供更多关于周围项目的代码吗?