[Qt-qml] Set an item size according to its child?
Juha Turunen
turunen at iki.fi
Thu Jul 14 11:20:24 CEST 2011
On Thu, Jul 14, 2011 at 12:08 PM, Alejandro Exojo <suy at badopi.org> wrote:
> But now the Item groups everything, but has not size. I can set the height
> with something like "height: colonSeparator.height + 10".
>
> Maybe I'm using the wrong approach? Should I use a Row instead?
> Thank you very much.
Row is fine if it's ok for you that the spacing between each child
item is the same. If you need more flexibility you can still size the
parent Item by using its childrenRect property
(http://doc.qt.nokia.com/4.7-snapshot/qml-item.html#childrenRect.x-prop)
Juha
More information about the Qt-qml
mailing list