[Qt-qml] SmoothedAnimation Soul Searching

Leonardo Cunha leo.cunha at nokia.com
Wed Sep 8 10:51:32 CEST 2010


hi,

> -----Original Message-----
> From: qt-qml-bounces at trolltech.com [mailto:qt-qml-
> bounces at trolltech.com] On Behalf Of Lam Bea (Nokia-MS-Qt/Brisbane) 
> 
> On 03/09/2010, at 8:10 PM, ext Alan Alpert wrote:
> 
> > I'm looking for some feedback on what people think the real use case
> for
> > SmoothedAnimation is. There's currently two different cases that I'm
> looking
> > into.
> >
> > A) Move from point C to point D, smoothly, where point D doesn't
> change
> > (much).
> > B) Move from point C to point D, smoothly, where point D is an
> animating or
> > constantly changing value.
> >
> [...]
> >
> > Where I need some help is not only in verifying the reasoning I just
> threw out
> > there. I'm not yet convinced that option B is common enough to be a
> valid use
> > case. Does anyone know of a non-contrived example where you genuinely
> want
> > behavior B and not A?
> >
> 
> 
> I've seen Case B to be useful when auto-scrolling a view where the
> content height continuously changes (e.g. because new items are being
> added constantly, or items have variable height and are resized as they
> are loaded). In this case NumberAnimation is too jerky since it
> restarts whenever the target value changes.

Another similar use case for B is for the list highlight to 'follow' a
selected item while the list is scrolling,
look at the list example.

In the B case, I agree with you that the duration doesn't help much, but I
don't know if the maximum velocity is what you always want on this case, as
you might prefer to not follow too fast (depends on whether you want to set
how much you can lag behind or you want the movement to follow with an
average speed, so it doesn't accelerate too much).

br,
// leo




More information about the Qt-qml mailing list