summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-04 06:51:45 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-04 06:51:45 (GMT)
commitded5e7184b5078864928d670a3b89e0e8aa88dda (patch)
tree7bf24be031a7492685a45b9d97052e142081638c /doc/src
parent7fec7ff568659c3816ce26d2d82d59dd372f1166 (diff)
downloadQt-ded5e7184b5078864928d670a3b89e0e8aa88dda.zip
Qt-ded5e7184b5078864928d670a3b89e0e8aa88dda.tar.gz
Qt-ded5e7184b5078864928d670a3b89e0e8aa88dda.tar.bz2
Document QmlContext ownership.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/qtbinding.qdoc5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index ffef345..cae0263 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -124,7 +124,10 @@ Rectangle {
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in the previous example was changed to red, the component object instances would
-all be automatically updated.
+all be automatically updated. Note that it is the responsibility of the creator to delete any
+QmlContext it constructs. If the \c windowContext in the example above is no longer needed when
+the \c window component instantiation is destroyed, the \c windowContext must be destroyed
+explicitly. The simplest way to ensure this is to set \c window as \c windowContext's parent.
QmlContexts form a tree - each QmlContext except for the root context has a parent. Child
QmlContexts effectively inherit the context properties present in their parents. This gives