diff options
Diffstat (limited to 'src/gui/widgets/qstackedwidget.cpp')
-rw-r--r-- | src/gui/widgets/qstackedwidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qstackedwidget.cpp b/src/gui/widgets/qstackedwidget.cpp index f2cd245..8a68cf2 100644 --- a/src/gui/widgets/qstackedwidget.cpp +++ b/src/gui/widgets/qstackedwidget.cpp @@ -84,9 +84,12 @@ int QStackedLayoutHFW::heightForWidth(int width) const int hfw = 0; for (int i = 0; i < n; ++i) { if (QLayoutItem *item = itemAt(i)) { - hfw = qMax(hfw, item->heightForWidth(width)); + if (QWidget *w = item->widget()) + hfw = qMax(hfw, w->heightForWidth(width)); } } + + hfw = qMax(hfw, minimumSize().height()); return hfw; } |