Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QLabel with layouts: sizes
tucnak last edited by
I want to fit sizes of my QLabel in layout according to its text.
Then I add it to layout. But how to make it fittable to its sizes? I want it to be bigger when there are more text and smaller when there are less text.
Actually, it displays on the center+left of the layout. But how to make it smaller?
How to deal with it?
QMartin last edited by
Whenever you set the label's text or introduce something in it, call
after your code. This action should resize your label if your content does not fit or it is smaller than before. Hope this helps!