diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-29 03:54:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-29 03:54:47 (GMT) |
commit | bfbded95056d43a65b2c9ef1fa90bfd40adc6472 (patch) | |
tree | c20ababb5a2e124e9c7ac796ace1d52380470bd3 /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | e8bc4cebe9963a8a4534a5febbd606a6e4d6a332 (diff) | |
parent | f425c08d4f2e7f061a0ee8e4a1eee2b17fa64962 (diff) | |
download | Qt-bfbded95056d43a65b2c9ef1fa90bfd40adc6472.zip Qt-bfbded95056d43a65b2c9ef1fa90bfd40adc6472.tar.gz Qt-bfbded95056d43a65b2c9ef1fa90bfd40adc6472.tar.bz2 |
Merge branch '4.6' of ../qt into kinetic-declarativeui
Conflicts:
src/script/api/qscriptengine.cpp
src/script/api/qscriptprogram.cpp
src/script/api/qscriptprogram.h
src/script/api/qscriptprogram_p.h
tests/auto/qscriptengine/tst_qscriptengine.cpp
tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
tools/qdoc3/test/qt-inc.qdocconf
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-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 e22486b..f8c627d 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 with the given \a parent item. + 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. @@ -7293,6 +7294,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 */ /*! @@ -7328,7 +7344,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() */ |