QPropertyAnimation动画结束的缓慢

时间:2017-07-07 12:33:59

标签: c++ qt

我想用QPropertyAnimation显示滑块的动画,但我有一个问题:在动画结束时,从一张图片到另一张图片的通道要慢于第一张

这是我的代码

QPropertyAnimation *animation = new QPropertyAnimation(ui->sliderSlices,"sliderPosition");
animation->setDuration(1000);
animation->setStartValue(ui->sliderSlices->value()));
animation->setEndValue(maxSlice);
animation->setEasingCurve(QEasingCurve::OutCubic);


animation->start();

有没有人可以找到解决方案?

0 个答案:

没有答案