[Development] New class for QtWidgets: ColumnResizer
Aurélien Gâteau
agateau at kde.org
Tue Jun 17 15:09:39 CEST 2014
Oswald Buddenhagen wrote:
> On Fri, Jun 13, 2014 at 04:46:34PM +0200, Aurélien Gâteau wrote:
>> Oswald Buddenhagen wrote:
>> > the default orientation is meant to link the width, as i think that's
>> > the by far more common case. whether one calls that horizontal or
>> > vertical is an awesome bikeshed, as we have seen in various discussions
>> > about splitters. my thinking was "width is horizontal on the screen".
>>
>> I see how orientation is confusing for splitters because the widgets use
>> one orientation while the splitter use the other, but here everything is
>> using the same orientation, so I would find it surprising that the
>> orientation to align two elements which are stacked vertically is
>> "horizontal".
>>
> it's funny how you correctly describe the situation for splitters and
> completely fail to see the analogy here, despite it being even more
> blatant: the name i proposed is linkDimension. the target object is
> rather clear, and the width dimension is unarguably horizontal, i'd
> think. but you are still thinking of the stacked widgets ...
Hu, I missed the "link" part of the variable :/
>
> a workable solution would be adding a new
> enum Dimension { Width, Height }.
> conveniently, this would also apply to the splitter case.
>
>> Maybe the easiest way to avoid bikeshed and ambiguity is to have two
>> methods: linkColumn() and linkRow()?
>>
> the QLayout base api doesn't have a concept of rows and columns.
Indeed, but the whole point of this feature is to align widgets so that they
look like they are in the same visual row or column. I find it easier to
understand this way.
Aurélien
More information about the Development
mailing list