logo       

Re: QFormLayout and consistency in systemsettings kcm modules: msg#13455

general

Subject: Re: QFormLayout and consistency in systemsettings kcm modules

Hi,

there is actually ongoing effort to turn code into using QFormLayout, please
do not revert those changes. QFormLayout has many advantages.

The bad label alignment is a known problem in Qt[1]. Some styles (Skulpture,
QtCurve, maybe others) already work around it.

If there is no fix in Qt near the end of the 4.4 development phase, I
will "backport" the fix from Skulpture to KStyle, and in the meantime
continue porting layouts to QFormLayout where it makes sense.

Thanks,
Christoph Feck (kdepepo)

[1]
http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=214318

Am Saturday 01 August 2009 00:52:58 schrieb Jacopo De Simoi:
> Hi everybody
>
> I noticed that almost all kcm modules use QVBoxLayouts for laying out our
> beloved configuration widgets. the "almost" there is due to (at least) the
> following exceptions:
>
> kdebase/workspace/kcontrol $ ack QFormLayout
> kdm/kdm-gen.cpp
> 35:#include <QFormLayout>
> 51: QFormLayout *fl = new QFormLayout( box );
> 74: fl = new QFormLayout( box );
> 107: fl = new QFormLayout( box );
>
> input/mouse.cpp //---- Advanced tab
> 51:#include <QFormLayout>
> 201: QFormLayout *lay = new QFormLayout(advancedTab);
> 322: QFormLayout *form = new QFormLayout();
>
> style/kcmstyle.cpp //---- Fine Tuning tab
> 46:#include <QtGui/QFormLayout>
> 232: QFormLayout* page2Layout = new QFormLayout( page2 );
>
> fonts/fonts.cpp //----- Subpixel configuration
> 25:#include <QFormLayout>
> 231: QFormLayout *layout=new QFormLayout(mw);
>
> In fact if you pay attention, the layout in each of the preceding cases is
> slightly different from the other cases. In particular the vertical
> alignment of the label with respect to the widget on its right is messed
> up; the text fields do not align correctly, they are a few pixels off, it
> seems that the label and the widget are Top aligned... At first I thought
> it was some issue with the qt-style I am hacking with, but the problem
> indeed is visible in all qt styles. Is there any clever flag to can pass
> the QFormLayout to make it align stuff consistenly with the other layouts?
> Otherwise, does anybody have any objections if I turn all QFormLayout to
> QVBoxLayout? luckily they are not that many and the other way it looks much
> better.
>
> Thanks
>
> --J

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise