[Qt-interest] QHBoxLayout alignment issue

Markus Franke Franke.M at sebakmt.com
Fri Mar 4 12:11:14 CET 2011


Bo Thorsen <bo at sonofthor.dk> schrieb am 04.03.2011 12:07:20:
> You have to set the stretch on the middle entry to 1 and the others to 
> 0. This way widget 1 and 3 won't get any space, and widget 2 gets all of 
it.
> 
> Use:
> 
> HValues->addWidget(Widget1, 0, Qt::AlignLeft);
> HValues->addWidget(Widget2, 1, Qt::AlignCenter);
> HValues->addWidget(Widget3, 0, Qt::AlignRight); // << this was changed
> HValues->setSpacing(5);

Bingo. That's exactly what  I was looking for.

Thank your very much for the quick reply.

Best regards,
Markus Franke


"Disclaimer: This message is intended only for the use of the individual 
or entity to
which it is addressed and may contain information which is privileged, 
confidential, proprietary,
or exempt from disclosure under applicable law. If you are not the 
intended recipient or the person
responsible for delivering the message to the intended recipient, you are 
strictly prohibited from
disclosing, distributing, copying, or in any way using this message. If 
you have received this 
communication in error, please notify the sender and destroy and delete 
any copies you may have
received."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110304/9c413f22/attachment.html 


More information about the Qt-interest-old mailing list