QLabel with layouts: sizes
General and Desktop
2
Posts
2
Posters
3.1k
Views
1
Watching
-
Hi, all!
I want to fit sizes of my QLabel in layout according to its text.
@
label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
label->setWordWrap(true);
label->setOpenExternalLinks(true);
@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?
!http://habrastorage.org/storage2/22e/1ac/51c/22e1ac51cbe980b7c229b43593f7b4ec.png(abbr)!
How to deal with it?