本文整理汇总了C++中QPropertyAnimation::setCurrentTime方法的典型用法代码示例。如果您正苦于以下问题:C++ QPropertyAnimation::setCurrentTime方法的具体用法?C++ QPropertyAnimation::setCurrentTime怎么用?C++ QPropertyAnimation::setCurrentTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QPropertyAnimation
的用法示例。
在下文中一共展示了QPropertyAnimation::setCurrentTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reverseStart
void Widget::reverseStart()
{
//If last message, play hide animation.
if (m_messageQueue.size() <= 1) {
QPropertyAnimation* bounceAnim = qobject_cast<QPropertyAnimation*>(m_animation.animationAt(1));
if(bounceAnim) {
if(bounceAnim->state() == QAbstractAnimation::Running){
return;
}
}
if (!m_messageQueue.isEmpty()){
if(m_animation.animationAt(1)){
doneBounce();
}
m_messageQueue.pop_front();
}
unsigned int duration = m_settings.get("gui/out_animation_duration").toInt();
QPropertyAnimation* anim = qobject_cast<QPropertyAnimation*>(m_animation.animationAt(0));
if (!anim) {
return;
}
disconnect(anim, SIGNAL(valueChanged(QVariant)), this, m_activePositionSlot.c_str());
anim->setDirection(QAnimationGroup::Backward);
anim->setEasingCurve(QEasingCurve::Type(m_settings.get("gui/out_animation").toInt()));
anim->setDuration(duration);
anim->setCurrentTime(duration);
connect(anim, SIGNAL(valueChanged(QVariant)), this, m_activePositionSlot.c_str());
anim->start();
//m_shortcutGrabber.disableShortcuts();
} else {
autoNext();
}
}