Skip to content
Advertisement

Tag: qscrollarea

Frozen widgets in QScrollArea

I’m trying to create a grid of square buttons that is scrollable if the window is too small to show all of them. I’d like there to be labels on the left-most column and top-most row showing the button indices. Is there a way to create a QScrollArea with the widgets (labels) in the top-most row and left-most column “frozen”.

QScrollArea: Scroll from item to item

Please consider the following code: Currently, the margins of the layout are dynamically set, so that, no matter the size of the window, the first and last item are always vertically centered: What I want to achieve now is that whenever I scroll (either by mousewheel or with the arrow-keys, as the scrollbars are disabled) the next widget should take

Scrollbars Do Not Appear in PyQt5 Custom Label

A few months ago I wanted to know how to draw on an image (Insert Image into QGridLayout and Draw on top of image in PyQt5). Eyllanesc very kindly gave me a complete solution. I now would like to have this image widget scrollable so I can enlarge it. Howerver, when I add a scroll area the scrollbars do not

Advertisement