diff -r 56cd8111b7f7 -r 41300fa6a67c src/gui/widgets/qsplitter.cpp --- a/src/gui/widgets/qsplitter.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/src/gui/widgets/qsplitter.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -360,13 +360,26 @@ before a hidden widget must be hidden. */ bool first = true; + bool allInvisible = n != 0; for (int i = 0; i < n ; ++i) { QSplitterLayoutStruct *s = list.at(i); - s->handle->setHidden(first || s->widget->isHidden()); - if (!s->widget->isHidden()) + bool widgetHidden = s->widget->isHidden(); + if (allInvisible && !widgetHidden && !s->collapsed) + allInvisible = false; + s->handle->setHidden(first || widgetHidden); + if (!widgetHidden) first = false; } + if (allInvisible) + for (int i = 0; i < n ; ++i) { + QSplitterLayoutStruct *s = list.at(i); + if (!s->widget->isHidden()) { + s->collapsed = false; + break; + } + } + int fi = 2 * q->frameWidth(); int maxl = fi; int minl = fi;