diff options
Diffstat (limited to 'src/widgets/kernel/qlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qlayout.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp index c62c8fae41..6dce2da969 100644 --- a/src/widgets/kernel/qlayout.cpp +++ b/src/widgets/kernel/qlayout.cpp @@ -106,11 +106,16 @@ static int menuBarHeightForWidth(QWidget *menubar, int w) /*! Constructs a new top-level QLayout, with parent \a parent. - \a parent may not be \nullptr. The layout is set directly as the top-level layout for \a parent. There can be only one top-level layout for a widget. It is returned by QWidget::layout(). + + If \a parent is \nullptr, then you must insert this layout + into another layout, or set it as a widget's layout using + QWidget::setLayout(). + + \sa QWidget::setLayout() */ QLayout::QLayout(QWidget *parent) : QObject(*new QLayoutPrivate, parent) @@ -120,18 +125,6 @@ QLayout::QLayout(QWidget *parent) parent->setLayout(this); } -/*! - Constructs a new child QLayout. - - This layout has to be inserted into another layout before geometry - management will work. -*/ -QLayout::QLayout() - : QObject(*new QLayoutPrivate, nullptr) -{ -} - - /*! \internal */ QLayout::QLayout(QLayoutPrivate &dd, QLayout *lay, QWidget *w) |