How to fit a label to a scroll Window Area in Qt designer?
-
I want to display a lot of icons in a label but as the number of icons is really high, I will need to be able to scroll horizontally and vertically in this label.
What I did : I created a ScrollArea with a horizontal and vertical scrollbar and also a label. However, it doesn't seem to work. I wrote a long sentence in the label but the scroll bars does not move what is inside the label. Actually, I think the scroll bars only relate to the scroll area but not to the label.
To summarize : I need a label of fixed size on my form where I would be able to scroll horizontally and vertically.
-
Hi,
Why are you adding scrollbars to a QScrollArea ? It already has them integrated.
-
I removed them but it still does not work. Should I set WidgetResizable to True or False ? I don't know if I need to set any particular layout ? My label should fit the whole scroll area I guess ? I set the frame shape to WinPanel, is it ok ?
Actually, all I need is a label where I can scroll in it... I am just looking at the easiest solution for it
-
Hi
- I want to display a lot of icons in a label
Why not use a ListWidget/ListView set to icon mode
and left to right flow ?
it can scroll in both direction and also show icons/only show icons.