Unsolved QLayout is wasting space
I add Qwidgets dynamically
for(int i = 0; i < value; i++)
//... widgetList_i.append(a lot of widgets)
But I do not want to do that manually. How can I start a layout already compressed?
EDIT: In short, I expect two things:
- Start that lower dockWidget/layout compressed, with no space wasting.
- After starting is should be possible to increase its size
try set widgets_i maximumheight to say 32 (for each)
Your widgets are currently evenly spaced inside your layout. What you can do is add
ui->verticalLayout->addStretch(1);after your loop. That will create a stretchable space that should push your widgets up as much as possible.
Hope it helps
Are you expecting the layout contained in your "dock" widget to resize the widget itself ?
which organized the containing widgets perfectly.
But that opened another problem, No I can not resize (move border between dockwidgets) between the Dockwidgets..