14 int main(
int argc,
char** argv)
16 QApplication app(argc, argv);
17 QLabel lbl1(
"Animated Window1");
18 QLabel lbl2(
"Animated Window2");
20 QPropertyAnimation* panim1 =
new QPropertyAnimation(&lbl1,
"geometry");
21 panim1->setDuration(3000);
22 panim1->setStartValue(QRect(120, 0, 100, 100));
23 panim1->setEndValue(QRect(480, 380, 200, 200));
24 panim1->setEasingCurve(QEasingCurve::InOutExpo);
26 QPropertyAnimation* panim2 =
new QPropertyAnimation(&lbl2,
"pos");
27 panim2->setDuration(3000);
28 panim2->setStartValue(QPoint(240, 0));
29 panim2->setEndValue(QPoint(240, 480));
30 panim2->setEasingCurve(QEasingCurve::OutBounce);
32 QParallelAnimationGroup group;
33 group.addAnimation(panim1);
34 group.addAnimation(panim2);
35 group.setLoopCount(3);
int main(int argc, char **argv)