[Qt-interest] How to alter QVBoxLayout widget spacing ?
william.crocker at analog.com
william.crocker at analog.com
Wed Feb 17 15:15:05 CET 2010
Alexandre Beraud wrote:
> Hi,
>
> I am surprised that you couldn't fix your problem with
> QLayout::setContentsMargins(). Make sure that you set small margin
> values (top, bottom, left, right) for all your layouts.
>
When I do QLayout work I set all layouts to:
lp->setContentsMargins(0,0,0,0); lp->setSpacing(0);
Get the app working and then adjust all of the spacings
and margins to make it pretty.
Bill
> Regards,
>
> Alex
>
>
> Stephen Collyer a écrit :
>> I have some code which creates a set of widgets with a structure like so:
>>
>> A QScrollArea contains a ParagraphList as its widget
>> A ParagraphList has a QVBoxLayout containing ParagraphRow widgets.
>> A ParagraphRow has a QHBoxLayout containing QTextEdit widgets.
>>
>> My problem is that the spacing between each ParagraphRow widget is too
>> great,
>> and I can't find any way to reduce it. I've tried adding stretches to
>> the QVBoxLayout,
>> and altering the layout's spacing and marging, yet none of this
>> reduces it.
>>
>> This is a picture of the layout which shows the problem:
>>
>> http://dl.dropbox.com/u/4271762/snapshot1.png
>>
>> Can anyone suggest anything else that I can try ?
>>
>> --
>> Stephen Collyer
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
More information about the Qt-interest-old
mailing list