PDA

View Full Version : QGraphicsItem / QGraphicsProxyWidget: how to make it flash?



RThaden
14th February 2010, 13:55
Hi all,

I can animate my QGraphicsProxyWidget with QGraphicsItemAnimation and do all kind of things with QPropertyAnimation.
But, is there a simple solution to make the widget flash two or three times?
I could use QPropertyAnimation with palette but that seems to be too complicated for such a simple task.

Rainer

Lykurg
14th February 2010, 15:54
Where is the problem? just set more points in the animation. E.g. you want to flash a white widget to black use:
animation->setStartValue(Qt::white);
animation->setKeyValueAt ( 0.2, Qt::black); // and this use several times to different time steps
animation->setEndValue(Qt::white);or use QAbstractAnimation::setLoopCount().

Lykurg
14th February 2010, 16:02
Deleted. It was a double post since my browser went crazy...