Adjustment of all widgets according to change in Size of UI Window Screen.
-
Currently I have a default window side for the UI and then I click the the restore-down/maximize button, it should change the UI according to the new set size of the window. Is there a way we can do that. Which function or module should I use it?
-
@VIDYUL-SHAH
In Object Explorer yourcentralWidget
has a "red no entry" sign, indicating it does have a layout on it. You never want that to be the case. Right click on it and set a layout. -
@VIDYUL-SHAH
What exactly do you mean by “UI Window Screen”?
If the size of your screen changes, the widgets won’t unless maximised.
If the size of your top level window changes and you want the widgets inside to adapt: Use layouts. -
@Axel-Spoerl I meant the main window or the dialog window I am using. So if the dimension of it changes using the maximize button on top right corner, the rest of the widgets should change the position or size accordingly. Because of every widget will change the size but might only change its position.
-
@VIDYUL-SHAH So, use layouts like @Axel-Spoerl suggested...
-
@VIDYUL-SHAH
In Object Explorer yourcentralWidget
has a "red no entry" sign, indicating it does have a layout on it. You never want that to be the case. Right click on it and set a layout. -
@VIDYUL-SHAH You need to click on the widget itself...
-
@jsulm
I think he has done that.@VIDYUL-SHAH
Don't ask me why or why it's so complicated in Designer. Just for now delete everything you have on the central layout. Then add some widget to it, doesn't matter what. Then you should be able to right click and select Set layout > at the bottom of the context menu. Or maybe you have to do on the widget in the actual viewing pane. Fiddle till you get it right, because you're going to need to do this for future widgets where you want a layout. It doesn't let you set a layout on a widget till it has a child widget, even though you could delete the child widget afterwards. To me it all makes no sense, but I didn't design it.... -
This post is deleted!
-
@JonB @jsulm After reading your replies, I created a new main window and removed status and tool bar. Then I have added two new widgets and 1 label. Still it doesn't give me any options neither, it enables layout options below the tool bar in qt designer. Is there a possibility that I might have not downloaded a full version of the software? Or I am doing a silly mistake.
-
@VIDYUL-SHAH said in Adjustment of all widgets according to change in Size of UI Window Screen.:
it enables layout options below the tool bar in qt designer
This should be exactly what you need. You really just have to right click on your main window (in an empty place) in designer.
-
-