Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.2.3
-
None
Description
If one tries to set a new duration that is shorter than the original duration, then start() will not work.
Calling start() again will work as the duration now is reset.
In the example below, wait until the first "animation" is finished - then click the button.
-------
#include <QtGui>
class myObject : public QPushButton
{
Q_OBJECT
public:
myObject()
public slots:
void animationFrame(int i)
void changeDuration()
{ myTimeLine->setDuration(2000); myTimeLine->start(); }void doIt()
{ myTimeLine->start(); }private:
QTimeLine *myTimeLine;
};
#include "main.moc"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
myObject obj;
obj.show();
obj.doIt();
return app.exec();
}