give fullrepresentation a parent immediately
like compactRepresentationItem, initialize it with the appletInterface as parent at creation not having any moment without parents
This commit is contained in:
parent
2dbeea4d23
commit
b2b1c93fac
@ -210,7 +210,9 @@ QQuickItem *AppletQuickItemPrivate::createFullRepresentationItem()
|
||||
}
|
||||
|
||||
if (fullRepresentation && fullRepresentation != qmlObject->mainComponent()) {
|
||||
fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->createObjectFromComponent(fullRepresentation, QtQml::qmlContext(qmlObject->rootObject())));
|
||||
QVariantHash initialProperties;
|
||||
initialProperties["parent"] = QVariant::fromValue(q);
|
||||
fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->createObjectFromComponent(fullRepresentation, QtQml::qmlContext(qmlObject->rootObject()), initialProperties));
|
||||
} else {
|
||||
fullRepresentation = qmlObject->mainComponent();
|
||||
fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->rootObject());
|
||||
|
Loading…
x
Reference in New Issue
Block a user