Resize Objects With Mainwindow Resize
-
wrote on 19 Apr 2016, 22:26 last edited by
hi,
i dropped 3 button and a label in my window
but i want when i resize my window,
my objects resize with it too,
how i can do this?
tnx -
Hi,
Use layouts. Look in the documentation for QHBoxLayout, QVBoxLayout and friends. For designer, there's the Using Layouts in Qt Designer chapter of Qt's documentation.
-
wrote on 20 Apr 2016, 04:31 last edited by
hi,
but in documentation dose Not explained this and just referred Layouts
i have a code that do this(resize),
but i want to question that it is possible to do this in visual design?
tnx a lot -
Hi
If you use layouts and put the buttons in one. Then no need
for any code to do resize.So using layouts is how you do in Visual Design.
Try this :
Make new project
open the mainwindow UI
Place a button in the empty mainwindow.
Right click empty spot on form
Select the Layout menu (bottom)
Select Layout Horizontally
3/4