make the toolbox directly child of containmentinterface
This commit is contained in:
parent
a5dc443b1b
commit
53893e8d0b
@ -124,13 +124,12 @@ void ContainmentInterface::init()
|
||||
|
||||
if (pkg.isValid()) {
|
||||
QObject *containmentGraphicObject = qmlObject()->rootObject();
|
||||
if (containmentGraphicObject) {
|
||||
QVariantHash toolboxProperties;
|
||||
toolboxProperties["parent"] = QVariant::fromValue(containmentGraphicObject);
|
||||
QObject *toolBoxObject = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")), 0, toolboxProperties);
|
||||
if (toolBoxObject) {
|
||||
containmentGraphicObject->setProperty("toolBox", QVariant::fromValue(toolBoxObject));
|
||||
}
|
||||
|
||||
QVariantHash toolboxProperties;
|
||||
toolboxProperties["parent"] = QVariant::fromValue(this);
|
||||
QObject *toolBoxObject = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")), 0, toolboxProperties);
|
||||
if (toolBoxObject && containmentGraphicObject) {
|
||||
containmentGraphicObject->setProperty("toolBox", QVariant::fromValue(toolBoxObject));
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Could not load toolbox package." << pkg.path();
|
||||
|
Loading…
Reference in New Issue
Block a user