What is the Qt equivalent for AutoEllipsis on a QLabel?
Solved
General and Desktop
-
I want my label to trim the text and add an ellipsis (…) when the text become to long but I cannot find this setting Qt.
Example:
myLabel->setText("Short text"); result: Short text myLabel->setText("Long text with plenty of letters"); result: Long text with ple…
-
Don't think this option exist. You need to customise it. There is an example in the Qt Examples directory which is on similar line.
-
@bs55: as @dheerendra said, there is an example:
http://doc.qt.io/qt-5/qtwidgets-widgets-elidedlabel-example.html