summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-17 07:45:01 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-17 07:47:19 (GMT)
commitc09c9704a934000425a1f4a0db0c59f09eaee041 (patch)
tree8d9ed67b28e65c89d7e5a21450ca310fd7d67006
parentcaef9533a860941701745e221e719438ea6870d8 (diff)
downloadQt-c09c9704a934000425a1f4a0db0c59f09eaee041.zip
Qt-c09c9704a934000425a1f4a0db0c59f09eaee041.tar.gz
Qt-c09c9704a934000425a1f4a0db0c59f09eaee041.tar.bz2
Doc: Mention that destroying an item that belongs to a QGraphicsScene is inneficient
As the virtual functions (such as the boundingRect()) are not available anymore in the destructor, the view has to refresh everything. Reviewed-by: Alexis
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 74b8fe2..f454d7c 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1183,6 +1183,9 @@ QGraphicsItem::QGraphicsItem(QGraphicsItemPrivate &dd, QGraphicsItem *parent,
Destroys the QGraphicsItem and all its children. If this item is currently
associated with a scene, the item will be removed from the scene before it
is deleted.
+
+ \note It is more efficient to remove the item from the QGraphicsScene before
+ destroying the item.
*/
QGraphicsItem::~QGraphicsItem()
{