diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-01-19 01:40:49 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-01-19 01:40:49 (GMT) |
commit | ebd4bc73c46c2962742a682b6a391fb68c482aec (patch) | |
tree | 3045a1af9e65ca6500437d4e90ccfd3637fb6976 /src/declarative/qml/qdeclarativecomponent.cpp | |
parent | 9c1e67d83f6175f339e6771be05ee60ba72426b3 (diff) | |
parent | 5d9738ed88da269033333299c16558882d346514 (diff) | |
download | Qt-ebd4bc73c46c2962742a682b6a391fb68c482aec.zip Qt-ebd4bc73c46c2962742a682b6a391fb68c482aec.tar.gz Qt-ebd4bc73c46c2962742a682b6a391fb68c482aec.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Diffstat (limited to 'src/declarative/qml/qdeclarativecomponent.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 38bd74b..8865ddd 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -627,6 +627,10 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent} property, or else the object will not be visible. + If a \a parent is not provided to createObject(), a reference to the returned object must be held so that + it is not destroyed by the garbage collector. This is regardless of Item.parent being set afterwards, + since setting the Item parent does not change object ownership; only the graphical parent is changed. + Dynamically created instances can be deleted with the \c destroy() method. See \l {Dynamic Object Management in QML} for more information. */ |