开发者

text is exceeding the listview bounds in Qt

I need to customize the listview,I am placing an icon and a text at the center of the listview.

If the text length is bigger then the list rectangle length.. the text is coming over the icon first letter of the string is not visible..

How to avoid this situation? Is it possible to give marique effect for the string?

Thanks in advanc开发者_Python百科e.


one way we can achive is

painter->drawText(Gradiantrect, Qt::AlignCenter,sfm.elidedText(subText,option.textElideMode, rectwidth));

if the text length is bigger then the width of rectangle,three dots are appearing after the text.

Thanks

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜