diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:15:55 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:15:55 +0200 |
commit | 3e949b75fd298a30fa4e8b281ecf21fcb038efbe (patch) | |
tree | 592bb2d6ca846a9d3aee66bc829d21ae8ba8c056 /src/widgets/kernel | |
parent | 4518345b80b0ee1101ecb0e7349728abd237aa6e (diff) | |
parent | d2b4a789c39eb770068b002d2bc9ceb764dedf3d (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
mkspecs/features/mac/default_pre.prf
mkspecs/macx-ios-clang/features/resolve_config.prf
qtbase.pro
Change-Id: I65b5ebca4942a4f295bdd4ac1568e5c347333aea
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qlayoutitem.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp index 76568a2c33..ee0c28ec76 100644 --- a/src/widgets/kernel/qlayoutitem.cpp +++ b/src/widgets/kernel/qlayoutitem.cpp @@ -306,6 +306,8 @@ void QLayoutItem::invalidate() /*! If this item is a QLayout, it is returned as a QLayout; otherwise 0 is returned. This function provides type-safe casting. + + \sa spacerItem(), widget() */ QLayout * QLayoutItem::layout() { @@ -315,6 +317,8 @@ QLayout * QLayoutItem::layout() /*! If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned. This function provides type-safe casting. + + \sa layout(), widget() */ QSpacerItem * QLayoutItem::spacerItem() { @@ -345,8 +349,14 @@ QSpacerItem * QSpacerItem::spacerItem() */ /*! - If this item is a QWidget, it is returned as a QWidget; otherwise - 0 is returned. This function provides type-safe casting. + If this item manages a QWidget, returns that widget. Otherwise, + \c nullptr is returned. + + \note While the functions layout() and spacerItem() perform casts, this + function returns another object: QLayout and QSpacerItem inherit QLayoutItem, + while QWidget does not. + + \sa layout(), spacerItem() */ QWidget * QLayoutItem::widget() { |