【发布时间】:2015-04-18 11:34:17
【问题描述】:
我正在使用 QPropertyAnimation 对象以下列方式移动一些控件:
QPropertyAnimation* animation = new QPropertyAnimation(message_, "pos");
animation->setDuration(2000);
animation->setStartValue(current_pos);
animation->setEndValue(new_pos);
animation->setEasingCurve(QEasingCurve::Linear);
animation->start(QAbstractAnimation::DeleteWhenStopped);
asl::checkedConnect(animation, SIGNAL(finished()), this, SLOT(slotScrollingFinished()));
对象通过每隔几毫秒执行一次并修改 pos 属性的值来工作 AFAIK,直到持续时间到期并达到最终值。
我想知道是否有办法修改内部 QPropertyAnimation 对象的间隔计时器,以更改它在 2 秒内访问 pos 属性的次数。
我在文档中看不到任何内容。
【问题讨论】:
标签: c++ qt4.7 qpropertyanimation