Resize widgets when i resize the window
-
i have this :https://www.dropbox.com/s/1s6tm173kwy6l2g/screeshot.png
I have 3 QTableView widgets, 2 scrollbars, one button and one line edit. How can i configure it so when i resize the window the widgets resize also?
I have done a search and i as far as i undestand i have to add a layout. The problem is when i add a layout all the dimension of my widgets change and i can't change them back. What should i do? -
I think i don't quite undestand what do you mean. I don't write code for the layouts. I open my .ui file with the design and i try to add a layout by right click the top widget (in the box where it has object-layout) and then i press Lay Out and i choose one the listed options. (I use Qt5)
-
Ok. Did you set layout for main window?
-
-
I don't want the dimension to change when i add the layout. For example when i add the grid layout i get this :https://www.dropbox.com/s/01r9o9cv21phta5/screenshot2.png
Of course when i resize the window i want the widgets to resize, that's why i want to add the layout to the widgets.
Sorry if i am not explaining my problem, i am doing my best
-
You can set the minimum dimensions of the widgets individually and then change the size policy. If these widgets have a layout associated with them, the on re-sizing the layout the widgets should automatically re-size. You can preview in the Qt-Designer and see if the functionality works as required by you.