QLabel text and ElideMode (...)
Hello,
Is it possible to somehow set elide mode for text in QLabels?
I have a lot of text (path with filename) that are displayed, and I wonder if it is possible to i.e. show instead of
"/home/username/workfiles/year2010/works/may/19/filename.jpg"
something like:
".../works/may/19/filename.jpg"
Regards
Re: QLabel text and ElideMode (...)
See QxtLabel or do it yourself...
Re: QLabel text and ElideMode (...)
You can get the eldied text via QFontMetrics::elidedText and set it on the label
Or alternatively you can subclass QLabel, override the setText function and set elided text from that function.
Re: QLabel text and ElideMode (...)
Thank you,
QxtLabel also use QFontMetrics so I kind of figure it out yesterday.
Regards