[Development] Linear QQuick layouts change proposal

Filippo Cucchetto filippocucchetto at gmail.com
Thu Dec 17 19:49:21 CET 2015


Hi everyone,
in these days i'm working on a project and dealing with how RowLayout and
ColumnLayout
behave. The thing that i don't like is that the elements are evenly spaced
if the the layout is wider than the sum of the elements implicit size. To
me the correct behaviour should mimic the one in the
Row (Column) positioner where elements are layed out one after the other.
The result is that most of the time you find yourself adding a dummy Item {
Layout.fillWidth: true } for moving the elements at the beginning (or end)
of the layout. This in turn create issues when you want to stretch an
element dynamically because you have to make this dummy Item invisible.
Finally adding a dummy item just for working around the default behaviour
make the code messy.
My proposal is to make the RowLayout (ColumnLayout) to lay thing one after
each other and for miming the old behaviour to add an enum for the spacing
property.
For example Layout { spacing: Layout.UniformSpacing } or something like
that.
In this way we can get the best of both worlds: old behaviour, new
behaviour and no dummy items.
What do you think?

-- 
Filippo Cucchetto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20151217/56d0ba77/attachment.html>


More information about the Development mailing list