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
精彩评论