summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qlayoutitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qlayoutitem.cpp')
-rw-r--r--src/gui/kernel/qlayoutitem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qlayoutitem.cpp b/src/gui/kernel/qlayoutitem.cpp
index e615b2d..6a91d95 100644
--- a/src/gui/kernel/qlayoutitem.cpp
+++ b/src/gui/kernel/qlayoutitem.cpp
@@ -516,7 +516,9 @@ bool QWidgetItem::hasHeightForWidth() const
{
if (isEmpty())
return false;
- return wid->hasHeightForWidth();
+ if (wid->layout())
+ return wid->layout()->hasHeightForWidth();
+ return wid->sizePolicy().hasHeightForWidth();
}
/*!