[Qt-interest] QLabel fill entire space of a cell of QGridLayout

David Boosalis david.boosalis at gmail.com
Thu Sep 9 15:48:51 CEST 2010


Adding it to the grid with Qt::AlignCenter will keep it small.

On Thu, Sep 9, 2010 at 5:29 AM, Markus Franke <Franke.M at sebakmt.com> wrote:

>
> Hi Oszkár,
>
> qt-interest-bounces at trolltech.com schrieb am 09.09.2010 14:22:26:
>
> > You could try creating a QHBoxLayout, to which you add your label and a
> > stretch.
> > Then add the QHBoxLayout to the grid layout's cell.
>
>
> thanks for your advise.
>
> This might work out but actually the label should grow in all directions.
> This would mean that I would have to add spacers all around the widget.
> I bet there must be a more elegant way with Qt.
>
> Best regards,
> Markus
>
>
>
> "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."
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100909/f70669f1/attachment.html 


More information about the Qt-interest-old mailing list