stack widget in qt designer not resizing
-
I'm using a stack widget to create a changeable area in main window, however I've troubled with stack widget not resizing itself according the layout outside.
The picture shows that once I put a layout inside the stack widget and change the layout outside's size, they wouldn't grow together, which means when the window get smaller, they conceal themselves behind the outside layout, and would get to wrong position once I enlarge the window.
I]EH68K$WEKDNGRU6AUW.png image url) -
@Puppy-Bear Your main window does not have a layout.
Right-click on an empty space in your main window (not inside red layouts!), then click on "Lay out" and then on one of the layouts. -
Thanks for the help, but I have tried right clicked on main window and set it with horizontal layout, the problem still remains , the stack widget and layout outside itself could change with the window's size, but the layout inside this widget wouldn't change(rightest position in the picture), it's neither changing size nor changing ratio according to the window
and the windows' size remains unchangeable. It seems that I am not able to run the UI in full screen for some reason.![0cf61ef3-de9f-4852-b8e1-bcc02daa682c-X@6~}MM7`U(TR9N0EFI(]C.png](https://ddgobkiprc33d.cloudfront.net/58325d0c-1185-4850-a6b8-2cdf9b09b393.png)
![d19554be-8702-4e60-be63-eab1c4a8fbd9-3@E2PU14K1{}`CWWM{8NT35.png
![8b6d0c8e-f3c0-49c5-babc-07259762783d-1SK(PAHD9~0TWTPL2GKT`3.png -
@Puppy-Bear Hey, seems that your stacked widget's page still doesn't have a layout.
So right-click in the stacked widget and choose a layout just like in the main window.
(You need to do that for every page of the stacked widget.)
A little tip: dragging a layout to an empty widget doesn't make it the widget's top-level layout so it will not be auto resized.
I recommend to read this: Setting A Top Level Layout.
So check this icon. It means the widget doesn't have a layout. If you have a widget with this icon and it has child widgets, then maybe something need to be fixed.