views:

54

answers:

1

Hi.

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 advance.

A: 

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

Shadow