michael.brasser | 1 Jul 07:29 2010
Picon

Re: Behavior vs. Follow - 4:1

On 29/06/2010, at 8:59 PM, ext Matthias Ettrich wrote:
> In the general case, where you do not have a timer, you can solve this the 
> following way:
> 
> 1. declare the property value where the animation should start
> 2. change it to whatever you like in a Component.onCompleted-handler.
> 
> Example:
> 
> Item {
> 	property int prop: <pre_initial_value>
>    Behaviour on prop{ <funky animation> }
>    Component.onCompleted: prop = <initial_value>
> }
> 
> 
> Alternatively, and probably nicer, you can declare the initial value in a 
> different state "Initial" and simply do 
> 
>   Component.onCompleted: state = "Initial"

This seems like an important alternative, since it is the only way to establish a binding in
Component.onCompleted (as opposed to assigning a value).

> To me the onCompleted-approach is appropriate, given that the usecase seems 
> rather esoteric.

A line in the docs or simple example show how to get this Behavior-on-startup behavior would probably be
nice if we remove the Follows.

(Continue reading)

Matthias Ettrich | 1 Jul 11:22 2010
Picon

Re: Behavior vs. Follow - 4:1

On Thursday 01 July 2010 07:29:01 Brasser Michael (Nokia-D-Qt/Brisbane) wrote:
[...]
> 
> A line in the docs or simple example show how to get this
>  Behavior-on-startup behavior would probably be nice if we remove the
>  Follows.
> 
> > Main advantage for the follow-removal: no more asymetric API, simpler
> > API, more exposure to the great and flexible Behavior.
> 
> Removing the Follows seems reasonable to me.
> 
> Michael
> 

Hi Michael, attached is a new example behavior.qml which could go into 
examples/declarative/animation/states.

It completes states.qml and transitions.qml.

Matthias
Attachment (behaviors.qml): text/x-csrc, 4604 bytes
_______________________________________________
Qt-qml mailing list
Qt-qml@...
http://lists.trolltech.com/mailman/listinfo/qt-qml
Leo.Cunha | 1 Jul 17:58 2010
Picon

Re: Behavior vs. Follow - 4:1

+1 for removing the follows.

> -----Original Message-----
> From: qt-qml-bounces@... [mailto:qt-qml-
> bounces@...] On Behalf Of Ettrich Matthias (Nokia-MS-
> Qt/Berlin)
> Sent: Thursday, July 01, 2010 11:22 AM
> To: qt-qml@...
> Subject: Re: [Qt-qml] Behavior vs. Follow - 4:1
> 
> On Thursday 01 July 2010 07:29:01 Brasser Michael (Nokia-D-Qt/Brisbane)
> wrote:
> [...]
> >
> > A line in the docs or simple example show how to get this
> > Behavior-on-startup behavior would probably be nice if we remove the
> > Follows.
> >
> > > Main advantage for the follow-removal: no more asymetric API,
> > > simpler API, more exposure to the great and flexible Behavior.
> >
> > Removing the Follows seems reasonable to me.
> >
> > Michael
> >
> 
> 
> Hi Michael, attached is a new example behavior.qml which could go into
> examples/declarative/animation/states.
> 
(Continue reading)


Gmane