tuli
14th May 2013, 19:34
Hey,
when i want to shrink a widget i usualy call resize(0,0), which works on normal widgets, but not for QDockWidget (floating or not).
Specifically, i have two QDockWidgets that are automatically docked onto the mainwindow:
addDockWidget(Qt::TopDockWidgetArea, a);
splitDockWidget(a, b, Qt::Horizontal);
Both of them can and will expand to any given size, but both also have a minimum size.
I'd now like to shrink QDockWidget a to occupy as little space as possible, thus allowing b to grow.
Calling
a->show();
a->resize(0,0);
before or after the docking doesnt work.
when i want to shrink a widget i usualy call resize(0,0), which works on normal widgets, but not for QDockWidget (floating or not).
Specifically, i have two QDockWidgets that are automatically docked onto the mainwindow:
addDockWidget(Qt::TopDockWidgetArea, a);
splitDockWidget(a, b, Qt::Horizontal);
Both of them can and will expand to any given size, but both also have a minimum size.
I'd now like to shrink QDockWidget a to occupy as little space as possible, thus allowing b to grow.
Calling
a->show();
a->resize(0,0);
before or after the docking doesnt work.