diff options
Diffstat (limited to 'src/widgets/kernel/qboxlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qboxlayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp index e1a7903628..d0e7a16999 100644 --- a/src/widgets/kernel/qboxlayout.cpp +++ b/src/widgets/kernel/qboxlayout.cpp @@ -942,7 +942,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); |