缩放动画
animation->setStartValue(widget2->geometry());
animation->setEndValue(QRect(0, 0, W, H));
animation->start();
emit isDone(0xFF);
滑动动画
label->setPixmap(stackedWidget->currentWidget()->grab());
QPropertyAnimation *animation1 = new QPropertyAnimation(label, "geometry");
animation1->setDuration(1000);
animation1->setStartValue(QRect(0, 0, this->width(), this->height()));
animation1->setEndValue(QRect(+this->width(), 0, this->width(), this->height()));
//animation1->setStartValue(1.0);
//animation1->start();
应用程序下载地址:https://download.csdn.net/download/loglingyy/88407491