summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-15 04:22:49 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-15 04:22:49 (GMT)
commit29edb69a909126448c4c73b2c216d0ccb7981418 (patch)
tree85a5f5f1ee26851f0af0c1b25ee8c6aeff46bc1f /src/declarative/qml/qdeclarativeengine.cpp
parentb55f19b956958dc94e8f35e7dc215a70445759a4 (diff)
downloadQt-29edb69a909126448c4c73b2c216d0ccb7981418.zip
Qt-29edb69a909126448c4c73b2c216d0ccb7981418.tar.gz
Qt-29edb69a909126448c4c73b2c216d0ccb7981418.tar.bz2
Little more doc on QabstractItemModel and QML.
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 72335d4..60dcc36 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -673,14 +673,16 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex
Ownership controls whether or not QML automatically destroys the QObject when the object
is garbage collected by the JavaScript engine. The two ownership options are:
-\o CppOwnership The object is owned by C++ code, and will never be deleted by QML. The
+\list
+\o CppOwnership - The object is owned by C++ code, and will never be deleted by QML. The
JavaScript destroy() method cannot be used on objects with CppOwnership. This option
is similar to QScriptEngine::QtOwnership.
-\o JavaScriptOwnership The object is owned by JavaScript. When the object is returned to QML
+\o JavaScriptOwnership - The object is owned by JavaScript. When the object is returned to QML
as the return value of a method call or property access, QML will delete the object if there
are no remaining JavaScript references to it and it has no QObject::parent(). This option
is similar to QScriptEngine::ScriptOwnership.
+\endlist
Generally an application doesn't need to set an object's ownership explicitly. QML uses
a heuristic to set the default object ownership. By default, an object that is created by