summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-27 14:17:16 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-27 14:17:16 (GMT)
commitabfee117ec2dd5ad5be3b1c497a12f884b28568d (patch)
treebdb9d7f9beb9215558b4d826e597fc8d7f265943 /src/gui/graphicsview/qgraphicsitem.cpp
parentdbb127c226f131fabe39d9ce89ace5d3e6f7deb9 (diff)
parent8135af2cebdaaccefb95f0be149328077d237a89 (diff)
downloadQt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.zip
Qt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.tar.gz
Qt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 97357a7..378a4b5 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()
*/