ParallelAnimation QML Type
Permite ejecutar animaciones en paralelo. Más información...
| Import Statement: | import QtQuick |
| Inherits: |
Descripción detallada
Los tipos « SequentialAnimation » y «ParallelAnimation» permiten ejecutar varias animaciones a la vez. Las animaciones definidas en una « SequentialAnimation » se ejecutan una tras otra, mientras que las definidas en una «ParallelAnimation» se ejecutan al mismo tiempo.
La siguiente animación ejecuta dos animaciones numéricas en paralelo. La animación « Rectangle » se desplaza hasta (50,50) animando simultáneamente sus propiedades « x » y « y ».
import QtQuick
Rectangle {
id: rect
width: 100; height: 100
color: "red"
ParallelAnimation {
running: true
NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
}
}Al igual que cualquier otro tipo de animación, una «ParallelAnimation» puede aplicarse de diversas formas, incluyendo transiciones, comportamientos y fuentes de valores de propiedades. 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 «ParallelAnimation», no se puede iniciar ni detener de forma individual; la « SequentialAnimation » o «ParallelAnimation» debe iniciarse y detenerse como un grupo.
Véase también « SequentialAnimation» , «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.