[Qt-interest] How to alter QVBoxLayout widget spacing ?
Stephen Collyer
scollyer at netspinner.co.uk
Wed Feb 17 16:02:02 CET 2010
On 17 February 2010 14:30, Sonic <get.sonic at gmail.com> wrote:
> On 02/17/2010 07:37 PM, 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.
> >
> >
> If there's more than enough space available, my experience is that
> QLayout will lay out items with equal spacing (unless you meddle with
> the stretch factors and stuff). Setting the contents margins won't help
> here, IMHO.
>
> What I've done as a work-around is to use a dummy background widget as
> the widget for the scroll area with QSrcollArea::setWidget().
> Then apply the QVBoxLayout to this dummy widget and then resize this
> widget to be just big enough to hold the number of ParagraphRow objects.
>
>
I'm not sure I follow this. Where does my ParagraphList fit in to this
hierarchy ?
That's the class that actually has the QVBoxLayout, and I can't see how I
add
the ParagraphRow widgets in your scenario. Do you have some sample code ?
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100217/430b5a3e/attachment.html
More information about the Qt-interest-old
mailing list