aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2014-07-24 10:13:42 +0200
committerMitch Curtis <mitch.curtis@digia.com>2014-07-24 13:40:10 +0200
commit619790ba60e223c90a7ff33635ec5ab227584cbf (patch)
tree7e9307771cdf5b34dc84ff72cafa4ef24ee0a696 /src/qml/qml/qqmlcomponent.cpp
parent593fb0bad1f8e3d982ac818708dcaa069c656b07 (diff)
QQmlComponent::create(): visual items must have a visual parent.
There seems to be a bit of confusion about this on public forums. Change-Id: Id193de541e7d7e353dc5d75b64a15f481e2cf8b6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 1da2f1c109..68f950d840 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -780,6 +780,11 @@ QQmlComponent::QQmlComponent(QQmlComponentPrivate &dd, QObject *parent)
The ownership of the returned object instance is transferred to the caller.
+ If the object being created from this component is a visual item, it must
+ have a visual parent, which can be set by calling
+ QQuickItem::setParentItem(). See \l {Concepts - Visual Parent in Qt Quick}
+ for more details.
+
\sa QQmlEngine::ObjectOwnership
*/
QObject *QQmlComponent::create(QQmlContext *context)