En esta página

GraphTransition QML Type

Un contenedor en el que se definen todas las animaciones. Más...

Import Statement: import QtGraphs

Propiedades

Descripción detallada

GraphTransition es un contenedor de animaciones dentro de Graphs2D. Define esta clase dentro de un tipo de gráfico para habilitar cambios animados para XYSeries en gráficos 2D. Para definir animaciones individuales, añádelas dentro de GraphTransition. Las animaciones individuales dentro de un mismo GraphTransition se ejecutan en paralelo. Si el gráfico detecta un GraphTransition durante la llamada a una función compatible que añade o sustituye un punto, los valores se interpolan de acuerdo con las animaciones añadidas.

Este ejemplo muestra cómo definir un GraphTransition dentro de un gráfico.

import QtGraphs

GraphsView {
    LineSeries {
        GraphTransition {
            GraphPointAnimation {}
        }
    }

    SplineSeries {
        GraphTransition {
            SplineControlAnimation {}
        }
    }
}

Nota: GraphTransition requiere que se defina directamente dentro del gráfico que se desea animar. Actualmente solo se admiten los gráficos de tipo « XYSeries ».

Véase también GraphPointAnimation y SplineControlAnimation.

Documentación de propiedades

TransitionType : enumeration

Tipo de transición.

ConstanteDescripción
NoneSin transición.
PointAddedSe ha añadido un punto.
PointReplacedSe ha sustituido un punto.
PointRemovedSe ha eliminado un punto.

animations : list<object>

Un contenedor para todas las animaciones de GraphTransition. Actualmente solo admite añadir y eliminar animaciones. Por defecto, la lista está vacía.

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