Solved Add ScrollArea to layoutless UI without breaking complex widget arrangement
-
My UI is clicked together in QtCreator's designer. Up to now, I did not work with layouts here (long time since, I normally use QML). Of course, my UI is unusable if the screen is too small, hence I'd like to have it all in a QScrollArea.
I've managed to drag everything into such a QScrollArea, but it shows no scroll bars. I've read that I have to use layouts for this to work. (Actually I'am using a GridLayout on my centralWidget now to have the ScrollArea be sized properly). Still no ScrollBars.
But even if I set every single widget's size policy on fixed/fixed - when I apply a layout to the scrollAreaContents widget, my widget arrangement goes bonkers.
Before choosing a layout:
After choosing GridLayout for my scrollArea:
I have tried to move all contents of the scrollAreaContentWidget to an additional layoutless QWidget as a kind of container, but I quite frankly didn't manage to do so (I am a noob to design mode), I can create the Widget as a child of scrollArea, but I don't succeed in dragging everything else in it.
Any ideas?
-
Solved by finally managing to bring a "container" widget into place.