Prevent QLabel from expanding when text length increases
Solved
General and Desktop
-
I have a horizontal layout with 3 labels where the labels on the left and right have expanding size policies and the label in the center has a fixed size. I want the middle label to always be centered, but when the text of the left or right expands it's pushing the other labels to the right or left.
Is it possible to have a QLabel truncate text without having to give it a fixed size?
-
Hi
Well its fairly easy to make.
https://forum.qt.io/topic/24530/solved-shortening-a-label/3
you can just promote your widgets to ElideLabel
http://doc.qt.io/qt-5/designer-using-custom-widgets.html
make it easy to switch them out.