diff options
author | David Boddie <dboddie@trolltech.com> | 2009-10-26 14:57:20 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-10-26 14:57:20 (GMT) |
commit | b5254a2500afebf74d5772c3ec0e03dc5c9243b6 (patch) | |
tree | dbdd121af545f1a59bf7822438ce6f3062a04a1a /src | |
parent | 755b4b9db0fdb6caec8ccc43aba30e7cdd3909f1 (diff) | |
download | Qt-b5254a2500afebf74d5772c3ec0e03dc5c9243b6.zip Qt-b5254a2500afebf74d5772c3ec0e03dc5c9243b6.tar.gz Qt-b5254a2500afebf74d5772c3ec0e03dc5c9243b6.tar.bz2 |
Doc: Fixed qdoc warnings.
Reviewed-by: Trust Me
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index f892bb4..edd2d7c 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1228,7 +1228,8 @@ void QGraphicsItemCache::purge() } /*! - Constructs a QGraphicsItem, passing \a item to QGraphicsItem's constructor. It does not modify \fn QObject::parent(). + Constructs a QGraphicsItem, passing \a item to QGraphicsItem's constructor. + It does not modify the parent object returned by QObject::parent(). If \a parent is 0, you can add the item to a scene by calling QGraphicsScene::addItem(). The item will then become a top-level item. @@ -7283,6 +7284,21 @@ static void qt_graphicsItem_highlightSelected( The class extends a QGraphicsItem with QObject's signal/slot and property mechanisms. It maps many of QGraphicsItem's basic setters and getters to properties and adds notification signals for many of them. + + \section1 Parents and Children + + Each graphics object can be constructed with a parent item. This ensures that the + item will be destroyed when its parent item is destroyed. Although QGraphicsObject + inherits from both QObject and QGraphicsItem, you should use the functions provided + by QGraphicsItem, \e not QObject, to manage the relationships between parent and + child items. + + The relationships between items can be explored using the parentItem() and childItems() + functions. In the hierarchy of items in a scene, the parentObject() and parentWidget() + functions are the equivalent of the QWidget::parent() and QWidget::parentWidget() + functions for QWidget subclasses. + + \sa QGraphicsWidget */ /*! @@ -7318,7 +7334,10 @@ void QGraphicsObject::grabGesture(Qt::GestureType gesture, Qt::GestureContext co /*! \property QGraphicsObject::parent - \brief the parent of the item. It is independent from \fn QObject::parent. + \brief the parent of the item + + \note The item's parent is set independently of the parent object returned + by QObject::parent(). \sa QGraphicsItem::setParentItem(), QGraphicsItem::parentObject() */ |