PDA

View Full Version : QGridLayOut



Rakesh_Kumar
8th January 2009, 08:21
Hi,

I am using Grid lay out for adding Labels in a frame. Then I am usuing setColumnStretch()
Then I am writing some text in the label. My requirement is whenever I don't have enough space for the text the text should be truncated but it's not happening. If my text width is more then it's not reducing the width of Label i.e I am not able to reduce the width of label less than the width of text.

I tried with setColumnMinimumWidth as zero and setSizeConstraint(QLayout::SetMinimumSize) but it didn't me help me.

So please help me to resolve the issue.

Regards,
Rakesh

jpn
8th January 2009, 13:50
Try changing the horizontal size policy of the label to QSizePolicy::Maximum.

Rakesh_Kumar
9th January 2009, 04:49
Thanks a lot.

I tried with QSizePolicy::Maximum. It didn't work but QSizePolicy::Ignored resolved my problem.

Regards,
Rakesh