How to program QScrollArea thorugh QtCreator
Hi i am trying to make an application which will have QStackedWidget on top of Widget and i have taken a QScrollArea and added multiple groupboxes to a verticalLayout but i was unable to see the scrollbar for QScrollArea. Even if i am increasing the number of groupboxes the groupboxes are adjusting on top of scrollarea but i am unable to see the scrollbar for scrollArea
Here is my creation hierarchy and application output
Please go through the below screenshots
The layout you have used, is that one you dragged from the widget box ?
Normally, you place one groupbox, right click and use the layout menu to add the layout.
Then add the rest of the groupboxes. (or add all, then right click and apply layout)
Those floating layouts (red) are to insert into another layout.
The reason no scrollbars come (it seems ) is that there is no minimum height for the group box.
so when you add a new the others are just compressed more.
Try setting a minimum height / add other widgets to them so they cant be small as a line
Thanks for replying i have done what you have said, but the layout is not getting added to the scrollAreaWidgetContents but it is adding seperately. You can check the below screen shot
Before Adding Layout:
After Adding Layout:
How i want to add through QtCreator
Im not sure what goes wrong.
I guess you are still not using the RIGHT click layout menu ?
Do not drag layouts from left box.
Please see this video.