[Qt-interest] Animation with QGraphicsView

Tiago Correia tiago at cnotinfor.pt
Sat May 2 15:36:07 CEST 2009


Hi,
Check the animation framework, from Qt Solutions.
http://www.qtsoftware.com/products/appdev/add-on-products/catalog/4/Utilities/qtanimationframework

On Sat, May 2, 2009 at 12:39 PM, Freddie Witherden <freddie at witherden.org>wrote:

> Hi all,
>
> My application uses QGraphicsView to model a physical system, in which the
> position of objects (x,y) is a function of time. Currently my application
> works by using a timer set to fire every m_timeStep milliseconds and calling
> scene()->advanced() in the timer event.
>
> This causes each simulated object to advance by m_timeStep and update its
> position. The problem is that if the system is unable to keep manage 60
> advances a second the simulation lags. Obviously this is not the right way
> to go about it.
>
> While it is not hard to de-couple the two, so we get the amount of time
> passed since the last update and add that to get the current simulation
> time. (As the simulation can be paused.)
>
> However, what is the best way to get Qt to try and pump out as many frames
> as possible. There has to be a better way than a timer.
>
> Regards, Freddie.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
Tiago Correia
chief technology officer

cnoti inovação & desenvolvimento – Aprendizagem enRiquecida pela Tecnologia
www.cnotinfor.pt
Telefone: +351 239 499 231

Subscreva gratuitamente a nossa Newsletter BICA – Boletim informativo de
Interactividade, Comunicação e Aprendizagem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090502/48f68e5d/attachment.html 


More information about the Qt-interest-old mailing list