QFormLayout and consistency in systemsettings kcm modules
Jacopo De Simoi
wilderkde at gmail.com
Fri Jul 31 23:52:58 BST 2009
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
51: QFormLayout *fl = new QFormLayout( box );
74: fl = new QFormLayout( box );
107: fl = new QFormLayout( box );
input/mouse.cpp //---- Advanced tab
201: QFormLayout *lay = new QFormLayout(advancedTab);
322: QFormLayout *form = new QFormLayout();
style/kcmstyle.cpp //---- Fine Tuning tab
232: QFormLayout* page2Layout = new QFormLayout( page2 );
fonts/fonts.cpp //----- Subpixel configuration
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.
More information about the kde-core-devel