intdt=qMax(1,info.currentTime()-m_lastTime);// make sure dt > 1
intdeltaTime=qMax(1,info.currentTime()-m_lastTime);// make sure deltaTime > 1
m_lastTime=info.currentTime();
doublecurrentMove=info.movement().norm()/dt;
m_speed=qMin(1.0,(m_speed*0.9+currentMove*0.1));// average it to get nicer result, at the price of being less mathematically correct, but we quicly reach a situation where dt = 1 and currentMove = 1