KDE HIG - Help needed for Padding and Spacing

Peter Simonsson peter.simonsson at gmail.com
Sat Sep 24 14:33:17 BST 2005


2005/9/24, Sébastien Laoût <slaout at linux62.org>:
> Hello Ellen,
>
> If the GUI is done by coding, the programer can use those static methods:
>
> #include <kdialogbase.h>
>
> * KDialogBase::marginHint()
> * KDialogBase::spacingHint()
>
> They return the number of pixels for margins (arround dialogs borders) and
> spacings (between GUI components) in pixels.
>
> I however don't know where it's configured, if it's not hardcoded.
> If it's configurable, then it doesn't matter if it's in pixels, isn't it?
>
> Using them make the dialogs (and other windows, of course: those functions are
> usable from anywhere in the code) margins/spacings consistent.
>
> I think it's better to advise those methods instead of saying a number of
> pixels...
>
> I don't know how we can get them when using Qt Designer!
>
To use them in designer you need to go to the form settings
(Edit->Form Settings...) and change the following:
In the Layouts groupbox check Use functions and set Margin to
KDialog::marginHint and Spacing to KDialog::spacingHint

--
LLaP
Peter Simonsson




More information about the kde-core-devel mailing list