diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2014-07-24 10:13:42 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@digia.com> | 2014-07-24 13:40:10 +0200 |
commit | 619790ba60e223c90a7ff33635ec5ab227584cbf (patch) | |
tree | 7e9307771cdf5b34dc84ff72cafa4ef24ee0a696 /src/qml/qml/qqmlcomponent.cpp | |
parent | 593fb0bad1f8e3d982ac818708dcaa069c656b07 (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.cpp | 5 |
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) |