d->contextInThread = true;
doneCurrent();
if (!d->animationDriver) {
- d->animationDriver = new QAnimationDriver(this);
+ d->animationDriver = d->context->createAnimationDriver(this);
connect(d->animationDriver, SIGNAL(started()), this, SLOT(_q_animationStarted()), Qt::DirectConnection);
connect(d->animationDriver, SIGNAL(stopped()), this, SLOT(_q_animationStopped()), Qt::DirectConnection);
}
if (!d->context || !d->context->isReady()) {
d->initializeSceneGraph();
- d->animationDriver = new QAnimationDriver(this);
+ d->animationDriver = d->context->createAnimationDriver(this);
connect(d->animationDriver, SIGNAL(started()), this, SLOT(update()));
}