Setting parent on toolbox causes problems. Instead delete via connection
Reviewed-by: Eike Hein
This commit is contained in:
parent
5e9fc425c6
commit
c38e6a204e
@ -123,7 +123,7 @@ void ContainmentInterface::init()
|
||||
QObject *toolBoxObject = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")), 0, toolboxProperties);
|
||||
if (toolBoxObject && containmentGraphicObject) {
|
||||
containmentGraphicObject->setProperty("toolBox", QVariant::fromValue(toolBoxObject));
|
||||
toolBoxObject->setParent(containmentGraphicObject);
|
||||
connect(containmentGraphicObject, &QObject::destroyed, toolBoxObject, &QObject::deleteLater);
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Could not load toolbox package." << pkg.path();
|
||||
|
Loading…
Reference in New Issue
Block a user