KShortcutWidget margins/paddings

Milian Wolff mail at milianw.de
Mon Jun 21 10:46:29 BST 2010


On Monday 21 June 2010 10:23:15 Aurélien Gâteau wrote:
> On 20/06/2010 20:33, Milian Wolff wrote:
> > Hello!
> > 
> > I've problems with KShortcutWidget, it's margins/paddings are too huge
> > and I don't know what to do about it. See e.g. this screenshot:
> > 
> > http://www.flickr.com/photos/milianw/4705488287/
> > 
> > It's a simple QFormLayout and the label to the left is completely
> > unaligned due to the margins/paddings in the shortcut widget.
> > 
> > Any hints on what to do to improve the visuals there?
> 
> Sounds like a double-margin problem. I wrote a post on my blog about this:
> http://agateau.wordpress.com/2007/11/29/setmargin0/
> 
> In short, doing something like:
> 
>   shortcutWidget->layout()->setMargin(0)
> 
> should fix it.
> 
> Or even better: fix KShortcutWidget to not set a margin on its layout.
> 
> Your dialog seems to suffer from the same problem. You can fix it so
> that the content lines up with the button bar as well.

Thank you,

that all worked like a charm and looks much nicer. And I learned a new best-
practice :)

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100621/2db08b8b/attachment.sig>


More information about the kde-core-devel mailing list