PDA

View Full Version : Compress text



bunjee
24th October 2007, 20:02
Hey there,

I'm displaying a text inside a QWidget box.

When the QWidget is smaller than the length of the text I'd like to display a portion of the text + ... at the end of it.

Is there something that does that in QT ?

jpn
24th October 2007, 20:04
Hi, take a look at

QFontMetrics::elidedText()
QxtLabel (http://libqxt.org/static/docs/classQxtLabel.html)

bunjee
24th October 2007, 20:25
Great,

Thanks.