-
Widget alignment.
Hey guys,
I'm specifying a specific alignment in my layout :
mLayout.addWidget(&mBubbleWidget, 0, indexVertical, Qt::AlignLeft);
But I still want it to be stretchable by doing this :
mLayout.setColumnStretch(indexVertical, 10);
for some reason when setting alignment the child widget won't stretch.
Any possibility to keep the stretchable behaviour with the left align flag ?
Thanks.
Ben.
-
Re: Widget alignment.
If you set Qt::AlignLeft then why would you want the widget to stretch?
One way is to create a wrapper widget with a horizontal layout, in which you add your widget + a spacer item( expanding policy ).
The add this widget to the grid layout.
Regards