Auto scale Widgets when i resize the Window
-
Hello,i got a problem on my Application
Im making a code editor with QT and i wanna auto scale the widgets when i resize the window.
I check google for a long time and tried horizontal layout,grid layout.... etc.
But the result is not what i want,this is what my editor looks like:
and when i make it maximum,it become this:
i wanna make it auto scale,i tried grid layout and i dont like it is because it make a small grid between them.I want all of them stick together.
and yea,if i use grid layout,the left list view and right code area will become same width.And i cant change it.
Please help me,thank you
-
Hi
Did you try the layoutStretch
It tells how to share the space. normal its even shared but you can tell it to
share so one widget get less than others etc.When you set the stretching values, it will keep this layout even when you maximize.
ps. i used horizontalLayout
-
@SGaist Okay i will give more details about my UI
Im making a code editor as the picture i sent above.
And i used Grid Layout but then there will have Gap between all widgets,can i ask how do i remove the gap?
I used right click the mainwidows and click layout and click grid layout.Please help me,thank you = DMy english is sucks sorry
-
Hi
Did you try the layoutStretch
It tells how to share the space. normal its even shared but you can tell it to
share so one widget get less than others etc.When you set the stretching values, it will keep this layout even when you maximize.
ps. i used horizontalLayout