Qt:如何对多个项目使用QGraphicsSiteManimation

Qt:如何对多个项目使用QGraphicsSiteManimation,qt,qgraphicsitem,Qt,Qgraphicsitem,我正在尝试使用QGraphicsSiteManimation控制多个项目的动画。为了理解QGraphicsItemAnimation,我将有一条QTimeline和几个QGraphicsItemAnimation控制的QGraphicSite 起初,我没有使用QGraphicsItemAnimation,而是只使用QTimeline,并连接QTimeline和QGraphicsItem 像这样: connect(timeLine, SIGNAL(valueChanged(qreal)), gra

我正在尝试使用QGraphicsSiteManimation控制多个项目的动画。为了理解QGraphicsItemAnimation,我将有一条QTimeline和几个QGraphicsItemAnimation控制的QGraphicSite

起初,我没有使用QGraphicsItemAnimation,而是只使用QTimeline,并连接QTimeline和QGraphicsItem

像这样:

connect(timeLine, SIGNAL(valueChanged(qreal)), graphicsItem, SLOT(scale(qreal)));

void GraphicsItem::scale(qreal value)
{
        setTransform(QTransform()
                     .translate(mZoomFactor.x(), mZoomFactor.y())
                     .scale(value + 1, value + 1)
                     .translate(-mZoomFactor.x(), -mZoomFactor.y()));
}
但使用这种方式会使动画看起来像丢失帧。
因此我参考了Qt示例,但是QGraphicsSiteManimation不提供类似于
setTransformAt()
setOpacityAt()
的功能。复杂动画有Qt示例吗?

在这种情况下,我必须使用QPropertyAnimation?顺便说一句,QGraphicsPixmapItem无法调整大小?在这种情况下,我必须使用QPropertyAnimation?顺便说一句,QGraphicsPixmapItem无法调整大小?