Hi Greg, I was literally talking about the order of the elements in the 'children' array of a given component. I realize that the 'z' property is sufficient when the stacking order is of interest, but in this particular case, I was thinking about reordering Columns and Rows. The documentation for Column has limitations for *manually* changing the 'x' or 'y' properties.
"Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind the x or y properties, use anchors on a child of a positioner, or have the height of a child depend on the position of a child, then the positioner may exhibit strange behavior. If you need to perform any of these actions, consider positioning the items without the use of a Column." I can make do with anchors, but seems like some dynamic behavior would make positioners more useful. Cheers, Alex On Sat, Sep 11, 2010 at 7:58 PM, Gregory Schlomoff <[email protected]> wrote: > It depends of what you mean by order. > Usually, the order of the children just determine their stacking position > (ie: the second child will stack over the first, the third will be over the > second, etc...). In this case, you can change the stacking order with the z > property. > In your case, the order of the Rectangles determine how the Column will > position them, so what you really have is a position problem, not an order > problem. And if I recall correctly, the doc for Column states that you can't > dynamically change the position of the items managed by the column. > So what would probably work in your case would be to anchor the rectangles > to each other, and to dynamically change the anchors. > Cheers, > greg > On Sun, Sep 12, 2010 at 9:02 AM, Alex <[email protected]> wrote: >> >> Hi all, >> >> Is there a way to dynamically change the child order of a particular >> Item? For example, suppose I have two Rectangles in a Column, and I >> sometimes need to reverse their order. >> >> Cheers, >> Alex >> _______________________________________________ >> Qt-qml mailing list >> [email protected] >> http://lists.trolltech.com/mailman/listinfo/qt-qml > > _______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
