[doc] Fix docs of QLayoutItem::widget()
QWidget does not inherit QLayoutItem (unlike QLayout and QSpacerItem, which do), so don't claim that in the docs. Added a note. Added cross-references between layout(), widget() and spacerItem(). Change-Id: I518b6842ef76fd1b72226b790dab75f429fae556 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
This commit is contained in:
parent
462f6029ed
commit
f1b77574f8
@ -300,6 +300,8 @@ void QLayoutItem::invalidate()
|
|||||||
/*!
|
/*!
|
||||||
If this item is a QLayout, it is returned as a QLayout; otherwise
|
If this item is a QLayout, it is returned as a QLayout; otherwise
|
||||||
0 is returned. This function provides type-safe casting.
|
0 is returned. This function provides type-safe casting.
|
||||||
|
|
||||||
|
\sa spacerItem(), widget()
|
||||||
*/
|
*/
|
||||||
QLayout * QLayoutItem::layout()
|
QLayout * QLayoutItem::layout()
|
||||||
{
|
{
|
||||||
@ -309,6 +311,8 @@ QLayout * QLayoutItem::layout()
|
|||||||
/*!
|
/*!
|
||||||
If this item is a QSpacerItem, it is returned as a QSpacerItem;
|
If this item is a QSpacerItem, it is returned as a QSpacerItem;
|
||||||
otherwise 0 is returned. This function provides type-safe casting.
|
otherwise 0 is returned. This function provides type-safe casting.
|
||||||
|
|
||||||
|
\sa layout(), widget()
|
||||||
*/
|
*/
|
||||||
QSpacerItem * QLayoutItem::spacerItem()
|
QSpacerItem * QLayoutItem::spacerItem()
|
||||||
{
|
{
|
||||||
@ -339,8 +343,14 @@ QSpacerItem * QSpacerItem::spacerItem()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
If this item is a QWidget, it is returned as a QWidget; otherwise
|
If this item manages a QWidget, returns that widget. Otherwise,
|
||||||
0 is returned. This function provides type-safe casting.
|
\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()
|
QWidget * QLayoutItem::widget()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user