diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2020-10-26 18:08:57 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2020-10-27 13:49:39 +0200 |
commit | 1e904ab342c1aaabbef67cbcc25cf3de9e35e755 (patch) | |
tree | 32da202a93007aa353352b3e9c376ed5ad75ea42 /src/widgets/kernel/qformlayout.cpp | |
parent | 07ab7c11b5d6a7c81dec96641d92ae1af3c33e16 (diff) |
QLayout docs: explain better what the QWidget ctor arg does
Make it clear in the docs that an alternative to calling QWidget::setLayout()
is to pass the parent widget to the Q*BoxLayout constructor. This basically
just copies the relevant bits from the the docs of QWidget and Q*Layout.
Change-Id: Id196dcdf9a876d9141aa145f23a83c45f8cda5f8
Pick-to: 5.15 5.12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/kernel/qformlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qformlayout.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp index ec1e5e4156..8c3d3448ca 100644 --- a/src/widgets/kernel/qformlayout.cpp +++ b/src/widgets/kernel/qformlayout.cpp @@ -1189,6 +1189,10 @@ QLayoutItem* QFormLayoutPrivate::replaceAt(int index, QLayoutItem *newitem) /*! Constructs a new form layout with the given \a parent widget. + 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(). + \sa QWidget::setLayout() */ QFormLayout::QFormLayout(QWidget *parent) |