Can it be translated?
Bernd Gehrmann
bernd at physik.hu-berlin.de
Wed Jun 16 17:32:05 BST 1999
> Sorry if it's RTFM, but could you explain to me in just a
> few words how it works?
>
> In the source I can see on many places hardcoded label/button
> sizes in pixels or what, how this relates to the
> layout management?
Well, it's exactly the opposite: you don't set any label
or button sizes :-) You just create widgets, set their
minimum sizes to something sensible (in most cases the
sizeHint() method provides a good default) and then put
all widgets of a dialog in a layout like a grid or a
horizontal/vertical box (or a combination of them). To
put a bit 'sugar' on it, you can set stretch factors for
certain grid columns or rows or add extra spacing.
Advantages:
* If done correctly, i18n is _never_ a problem. Labels are
automatically resized to a size where you can see all
the text.
* Dialogs are resizable. This is especially important if
the dialog contains list boxes or multi line editors.
Bernd.
More information about the KDevelop
mailing list