ParallelAnimation QML Type
Permite que as animações sejam executadas em paralelo. Mais...
| Import Statement: | import QtQuick |
| Inherits: |
Descrição detalhada
Os tipos ` SequentialAnimation ` e `ParallelAnimation` permitem que várias animações sejam executadas simultaneamente. As animações definidas em uma ` SequentialAnimation ` são executadas uma após a outra, enquanto as animações definidas em uma `ParallelAnimation` são executadas ao mesmo tempo.
A animação a seguir executa duas animações numéricas em paralelo. A Rectangle se move para (50,50) ao animar suas propriedades x e y ao mesmo tempo.
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 }
}
}Como qualquer outro tipo de animação, uma ParallelAnimation pode ser aplicada de várias maneiras, incluindo transições, comportamentos e fontes de valores de propriedade. A documentação “Animação e Transições em Qt Quick ” mostra diversos métodos para criar animações.
Observação: uma vez que uma animação tenha sido agrupada em uma SequentialAnimation ou ParallelAnimation, ela não pode ser iniciada ou interrompida individualmente; a SequentialAnimation ou ParallelAnimation deve ser iniciada e interrompida como um grupo.
Consulte também “ SequentialAnimation” , “Animações e transições em Qt Quick ” e “Exemplos deQt Quick – Animação”.
© 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.