Qt 5.60
Hello,
Trying to change the bounce height of an easing curve.
Even with a value of zero, the bounce always looks the same.
What am I doing wrong?
Regards
From the help system:-
void QEasingCurve::setOvershoot(qreal overshoot)
Sets the overshoot to overshoot.
0 produces no overshoot, and the default value of 1.70158 produces an overshoot of 10 percent.
qreal overshoot = 1.7; // 0.0
QEasingCurve easing = (QEasingCurve::OutElastic);
QPropertyAnimation *animation[qty];
for (uint i = 0; i < qty; i++)
{
animation[i] = new QPropertyAnimation(numLabel[i], "geometry");
animation[i]->setDuration(1500);
easing.setOvershoot(overshoot);
//easing.setAmplitude(overshoot);
animation[i]->setEasingCurve(easing);
animation
[i
]->setStartValue
(QRect(-2,
-86,
100,
80));
animation
[i
]->setEndValue
(QRect(-2,
-2,
100,
80));
}
for (uint i = 0; i < qty; i++)
{
animation[i]->start();
tDelay(300); // milliSecs
}
qreal overshoot = 1.7; // 0.0
QEasingCurve easing = (QEasingCurve::OutElastic);
QPropertyAnimation *animation[qty];
for (uint i = 0; i < qty; i++)
{
animation[i] = new QPropertyAnimation(numLabel[i], "geometry");
animation[i]->setDuration(1500);
easing.setOvershoot(overshoot);
//easing.setAmplitude(overshoot);
animation[i]->setEasingCurve(easing);
animation[i]->setStartValue(QRect(-2, -86, 100, 80));
animation[i]->setEndValue(QRect(-2, -2, 100, 80));
}
for (uint i = 0; i < qty; i++)
{
animation[i]->start();
tDelay(300); // milliSecs
}
To copy to clipboard, switch view to plain text mode
Bookmarks