开发者

what property should i set to Fit the text in label

I want to display a big string in a Qlablel for this I simply have created a label in the Qt GUI editor.

Then set the string with the Wordwrap property to "ON".

Here text is not coming to the next line itself. Instead,开发者_开发百科 it's crossing the view region.

However, if I give an "\n" it works well.

How do I put up the big string in a label to display in a visible region?


label->setWordWrap(true);

See the QLabel::setWordWrap(bool on) documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜