SequentialAnimation QML Type
Permite que las animaciones se ejecuten secuencialmente. Más...
| Import Statement: | import QtQuick |
| Inherits: |
Descripción detallada
Los tipos SequentialAnimation y ParallelAnimation permiten ejecutar varias animaciones a la vez. Las animaciones definidas en SequentialAnimation se ejecutan una tras otra, mientras que las definidas en ParallelAnimation se ejecutan al mismo tiempo.
El siguiente ejemplo ejecuta dos animaciones numéricas en una secuencia. El Rectangle anima a una posición x de 50, luego a una posición y de 50.
import QtQuick Rectangle { id: rect width: 100; height: 100 color: "red" SequentialAnimation { running: true NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 } NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 } } }
Las animaciones definidas dentro de un Transition se ejecutan automáticamente en paralelo, por lo que puede utilizarse SequentialAnimation para encerrar las animaciones en un Transition si éste es el comportamiento preferido.
Como cualquier otro tipo de animación, una SequentialAnimation puede ser aplicada de varias maneras, incluyendo transiciones, comportamientos y fuentes de valores de propiedades. La documentación de Animación y Transiciones en Qt Quick muestra una variedad de métodos para crear animaciones.
Nota: Una vez que una animación ha sido agrupada en una SequentialAnimation o ParallelAnimation, no puede ser iniciada y detenida individualmente; la SequentialAnimation o ParallelAnimation debe ser iniciada y detenida como un grupo.
Véase también ParallelAnimation, Animación y transiciones en Qt Quick, y Qt Quick Ejemplos - Animación.
© 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.