OpacityAnimator QML Type
Le type OpacityAnimator anime l'opacité d'un élément. Plus d'informations...
| Import Statement: | import QtQuick |
| Inherits: |
Description détaillée
Animator Les types Animator sont différents des types d'animation normaux. Lors de l'utilisation d'un Animator, l'animation peut être exécutée dans le fil de rendu et la valeur de la propriété sautera à la fin lorsque l'animation sera terminée.
La valeur de Item::opacity est mise à jour une fois l'animation terminée.
L'extrait suivant montre comment utiliser un OpacityAnimator avec un élément Rectangle.
Rectangle { id: opacityBox width: 50 height: 50 color: "lightsteelblue" OpacityAnimator { target: opacityBox; from: 0; to: 1; duration: 1000 running: true } }
Il est également possible d'utiliser le mot-clé on pour lier l'OpacityAnimator directement à une instance d'élément.
Rectangle { width: 50 height: 50 color: "lightsteelblue" OpacityAnimator on opacity{ from: 0; to: 1; duration: 1000 } }
© 2025 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.