[Qt-interest] How to alter QVBoxLayout widget spacing ?

Alexandre Beraud aberaud at infflux.com
Wed Feb 17 15:42:23 CET 2010


Indeed, you are right. Then adding stretches at the end of the main 
vertical layout as well as all horizontal layouts should do the trick.

Regards,

Alex


Sonic a écrit :
>
> 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 know it's a bit ugly, but that's how I made it worked :-(
>
> regards,
>
> Syam
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>   


-- 
Alexandre BERAUD
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com




More information about the Qt-interest-old mailing list