[Development] New class for QtWidgets: ColumnResizer

Ziller Eike Eike.Ziller at digia.com
Fri Jun 13 09:51:02 CEST 2014


On Jun 12, 2014, at 6:51 PM, Oswald Buddenhagen <oswald.buddenhagen at digia.com> wrote:

> On Thu, Jun 12, 2014 at 04:08:17PM +0200, Aurélien Gâteau wrote:
>> Olivier Goffart wrote:
>>> But just wondering if it would not be better to have that as an API within
>>> QGridLayout such as
>>>  QGridLayout::setAlignedWith(QGridLayout*)
>> 
>> The class works with QFormLayout as well, so I don't think moving the 
>> feature into QGridLayout would be a good idea.
>> 
> they have a common base class, you know ...
> 
>  QLayout::linkDimension(QLayout *other, Qt::Orientation orientation = Qt::Horizontal)
> 
> (the second parameter is actually a flag field).
> 
> and for more fine-grained control one could consider (not sure this makes
> sense):
> 
>  QLayoutItem::linkDimension(QLayoutItem *other, Qt::Orientation orientation = Qt::Horizontal)
> 
> but then, i wonder whether you are fixing the right problem to start
> with. usually, one would create a big master layout, and embed
> sublayouts spanning multiple cells in the areas that are not supposed to
> be contrained by the grid.

In principle I like the idea of being able to work with a “master” grid. That’s something I wished e.g. for Qt Creator’s preferences dialog, where we use group boxes to group options, and these contain either something like what form layout does, or lists of checkboxes etc, or a mix.
Currently it is basically impossible to align the content in the vertically layouted group boxes.

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Development mailing list