Hi Bea, Sadly, your example does not address the problem that the animation should work regardless of what is contained in the Row layout. In the "reparented"-state, you use absolute positioning for the end position of the animation, which i hope you agree is not a very robust solution (adding another item before, adding a spacing to the layout or even just resizing the previous element is enough to throw it off).
Since the only one who knows where the item is to be positioned is the Row itself, I was hoping that the add/move transitions for the row layout might be of help, but I haven't found a way to do this yet. ...and as a sidenote, I enjoyed your devdays presentation this year :) Harald Hvaal [email protected] On Thu, Dec 15, 2011 at 8:40 AM, <[email protected]> wrote: > This can be done with a ParentAnimation. I've attached a modified example > that uses ParentChange and ParentAnimation. > > There is an odd bug where the item's value jumps by -100 at the start of the > animation if the bottomRight row is anchored to the right of its parent; for > some reason, this doesn't occur if the bottomRight row is positioned with an > x value instead. > > > cheers, > > Bea > > On 14/12/2011, at 4:09 PM, ext Harald Hvaal wrote: > >> Is there really no way to do this guys? Not even with qt quick 2? >> Although I'm hoping to avoid it, would it help if I wrote some component >> in c++? >> >> Harald >> >> On Sat, Dec 10, 2011 at 11:49 AM, Harald Hvaal <[email protected]> >> wrote: >>> Hi, I am hoping that someone could help me solve this seemingly simple >>> problem: >>> How do I animate an item moving from one layout two another? >>> >>> I have attached a small example of what I am trying to do, but even >>> more summarized the problem goes like this: >>> >>> Row { id: top; Box{id: box} } >>> Row { id: bottom; } >>> Button { onClicked: { box.parent = bottom; } >>> >>> How do I animate this parentchange? >>> >>> I have tried add/move-transitions on the rows, I have tried >>> ParentChange in states, ParentAnimations used on behaviors, nothing >>> seems to solve this problem. Any help would be greatly appreciated! >>> >>> Thanks, >>> >>> Harald Hvaal >>> [email protected] >> _______________________________________________ >> Qt-qml mailing list >> [email protected] >> http://lists.qt.nokia.com/mailman/listinfo/qt-qml > _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
