Sur cette page

GraphTransition QML Type

Un conteneur dans lequel toutes les animations sont définies. En savoir plus...

Import Statement: import QtGraphs

Propriétés

Description détaillée

GraphTransition est un conteneur d'animations au sein de Graphs2D. Définissez cette classe au sein d'un type de graphe pour activer les changements animés lors d'XYSeries s au sein de graphes 2D. Pour définir des animations individuelles, ajoutez-les à l'intérieur de GraphTransition. Les animations individuelles au sein d’un même GraphTransition s’exécutent en parallèle. Si le graphe détecte un GraphTransition lors de l’appel d’une fonction prise en charge qui ajoute ou remplace un point, les valeurs sont alors interpolées en fonction des animations ajoutées.

Cet exemple montre comment définir un GraphTransition au sein d’un graphique.

import QtGraphs

GraphsView {
    LineSeries {
        GraphTransition {
            GraphPointAnimation {}
        }
    }

    SplineSeries {
        GraphTransition {
            SplineControlAnimation {}
        }
    }
}

Remarque : GraphTransition doit être défini directement à l’intérieur du graphique à animer. Actuellement, seuls les graphes de type « XYSeries » sont pris en charge.

Voir également GraphPointAnimation et SplineControlAnimation.

Documentation sur les propriétés

TransitionType : enumeration

Type de transition.

ConstanteDescription
NonePas de transition.
PointAddedUn point a été ajouté.
PointReplacedUn point a été remplacé.
PointRemovedUn point a été supprimé.

animations : list<object>

Un conteneur regroupant toutes les animations de l'GraphTransition. Actuellement, il ne prend en charge que l'ajout et la suppression d'animations. Par défaut, la liste est vide.

© 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.