- m_closeAnimation->setStartValue(r);
- m_closeAnimation->setEndValue(r2);
- m_closeAnimation->setEasingCurve(QEasingCurve::InQuad);
- m_closeAnimation->start();
+ closeAnimation->setStartValue(r);
+ closeAnimation->setEndValue(r2);
+ closeAnimation->setEasingCurve(QEasingCurve::InQuad);
+ closeAnimation2->setStartValue(1.0);
+ closeAnimation2->setEndValue(0.0);
+ QParallelAnimationGroup *group = new QParallelAnimationGroup;
+ connect(group, SIGNAL(finished()), this, SLOT(deleteLater()));
+ group->addAnimation(closeAnimation);
+ group->addAnimation(closeAnimation2);
+ group->start(QAbstractAnimation::DeleteWhenStopped);