I have an widget x
with fixed size. Then at first I took a QScrollArea and then a QGridLayout which I set as the layout of scrollAreaWidgetContent. Then I started adding some widget x
in the layout at (0,0), (0,1), (1,0), (1,1)... of grid layout. Then when I ran the program, strangely when I shrink the window vertically, the widgets overlap.
And as expected, when I increase the window size vertically, they are not overlapped anymore.
But strange thing is this problem does not occurring when I shrink window horizontally. For example,
My question is, why this is happening and more importantly, keeping in mind I want to use gridlayout, how to solve this problem?
As you said in your question: Your widget has a fixed size, so the layout does not shrink them when there is no space left. So the question is: what do you want to happen when you shrink the window?