diff options
Diffstat (limited to 'src/gui/kernel/qboxlayout.cpp')
-rw-r--r-- | src/gui/kernel/qboxlayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qboxlayout.cpp b/src/gui/kernel/qboxlayout.cpp index 91393ed7e0..444cea22aa 100644 --- a/src/gui/kernel/qboxlayout.cpp +++ b/src/gui/kernel/qboxlayout.cpp @@ -1001,7 +1001,8 @@ void QBoxLayout::insertSpacerItem(int index, QSpacerItem *spacerItem) void QBoxLayout::insertLayout(int index, QLayout *layout, int stretch) { Q_D(QBoxLayout); - addChildLayout(layout); + if (!adoptLayout(layout)) + return; if (index < 0) // append index = d->list.count(); QBoxLayoutItem *it = new QBoxLayoutItem(layout, stretch); |