I think there is a semantic inconsistence in QAsbtractAnimation. The value
received in QAbstractAnimation::updateCurrentTime is not the same as the
currentTime property. The method should be named updateTime or
updateCurrentTotalTime (or the documentation should clear this).
A simple program that outputs the difference:
#include <QApplication>
#include <QLabel>
#include <QDebug>
#include <QAbstractAnimation>
class Animation : public QAbstractAnimation
{
public:
Animation() : QAbstractAnimation() {}
int duration() const
{
return 3000;
}
protected:
void updateCurrentTime(int msecs)
{
qDebug() << "updateCurrentTime(" << msecs << ")";
qDebug() << "currentTime is" << currentTime();
}
};
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
Animation *anim = new Animation();
anim->setLoopCount(5);
anim->start();
QLabel *w = new QLabel("Check debug");
w->show();
return app.exec();
}
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback