我应该设置什么属性来适应标签中的文本
我想在 Qlabell 中显示一个大字符串,为此我只是在 Qt GUI 编辑器中创建了一个标签。
然后将字符串的 Wordwrap
属性设置为“ON”。
这里的文本本身不会进入下一行。相反,它穿过了视图区域。
但是,如果我给出 "\n"
它效果很好。
如何将大字符串放在标签中以显示在可见区域中?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅QLabel::setWordWrap(bool on) 文档。
See the QLabel::setWordWrap(bool on) documentation.