Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
Currently, there is no API to retrieve the internal Model created by RuntimeLoader, and no API to make it pickable. It would be nice to have a RuntimeLoader.pickable property.
Manual hack
Iterate across the RuntimeLoader's children to find the Model and make it pickable:
RuntimeLoader { id: loader source: "..." function makeChildModelsPickable(node) { if (node?.pickable !== undefined) // Only Models have a `pickable` property defined node.pickable = true node.children.forEach(childNode => makeChildModelsPickable(childNode)) } Component.onCompleted: makeChildModelsPickable(loader) // Mark the model at startup onSourceChanged: makeChildModelsPickable(loader) // Mark the model each time we change the source file }