I have a horizontal
QScrollArea, loaded with a
At some point I make changes to the
QLabeland load it with shorter text.
The problem is that after I load the shorter text, the horizontal scroll bar is still showing (although not needed). It's still showing, fitting the previous text length. Note that I see the text changed successfully, but the scroll bar isn't updated as expected.
I tried the following as mentioned here:
None of them worked.
This post is deleted!
Did you check that the size of the label changes after you set the text ?
Setting the widgetResizable property to
trueshould do what you want. No need to call update or repaint. They mostly just invoke a paint event. They don't adjust sizes.
@Moderators - It worked, thanks!