import QtQuick 2.0 Rectangle { id: frame; width: 500; height: 500; color: 'white'; property real t; SequentialAnimation on t { id: anim; NumberAnimation { from: 0; to: 1; duration: 1000; } ScriptAction { script: { view.model = (view.model+1)%2; anim.restart(); } } } /*Connections { target: anim; onRunningChanged: { if (!anim.running) { view.model = (view.model+1)%2; anim.restart(); } } }*/ Repeater { id: view model: 1; Rectangle { x: 450*frame.t; y: 50*index; width: 50; height: 50; color: 'black'; } } Component.onCompleted: { anim.start(); } }