SequentialAnimation QML Type
Permite ejecutar animaciones de forma secuencial. 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 un «SequentialAnimation» se ejecutan una tras otra, mientras que las definidas en un « ParallelAnimation » se ejecutan al mismo tiempo.
El siguiente ejemplo ejecuta dos animaciones numéricas en secuencia. El elemento « Rectangle » se anima hasta alcanzar una posición de « x » de 50 y, a continuación, hasta una posición de « 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 una « Transition » se ejecutan automáticamente en paralelo, por lo que se puede utilizar «SequentialAnimation» para agrupar las animaciones en una « Transition » si este es el comportamiento deseado.
Al igual que cualquier otro tipo de animación, una «SequentialAnimation» puede aplicarse de diversas formas, incluyendo transiciones, comportamientos y fuentes de valores de propiedad. La documentación «Animación y transiciones en Qt Quick » muestra diversos métodos para crear animaciones.
Nota: Una vez que una animación se ha agrupado en una «SequentialAnimation» o en un « ParallelAnimation », no se puede iniciar ni detener de forma individual; la «SequentialAnimation» o el « ParallelAnimation » deben iniciarse y detenerse como un grupo.
Véase también « ParallelAnimation» , «Animación y transiciones en Qt Quick » y «Ejemplos deQt Quick: 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.