For example i know how to fade in/fade out a widget
QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(this);
opacityEffect->setOpacity(1.0);
time_for_next->setGraphicsEffect(opacityEffect);
QPropertyAnimation* anim = new QPropertyAnimation(this);
anim->setTargetObject(opacityEffect);
anim->setPropertyName("opacity");
anim->setDuration(500);
anim->setStartValue(opacityEffect->opacity());
anim->setEndValue(end_value);
anim->setEasingCurve(QEasingCurve::OutQuad);
anim->start(QAbstractAnimation::DeleteWhenStopped);
Or how to move/resize a widget with animation:
QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry");
animation->setDuration(10000);
animation->setStartValue(QRect(0, 0, 100, 30));
animation->setEndValue(QRect(250, 250, 100, 30));
animation->start();
But my question is were can i find a list with all the animations i can do?
For example i want to animate the increasing of a label’s text’s font point size. Can i do it?
↧