I'm creating a 3D QtWayland compositor and when putting the ShellSurfaceItems on a Qt3D plane I use a NodeInstantiator. Doing so registers all the properties except for the entities on my Scene2D (what I use to display the 2D ShellSurfaceItem on the 3D plane)
I've tried everything from setting the entities property when the component is loaded to manually instantiating my custom Panel components (all QML). The entities simply do not link to the event handlers in Scene2D
NodeInstantiator:
NodeInstantiator {
model: shellSurfaces
Panel {
id:panel
shellSurf: modelData
listIndex: index
}
}
Panel.qml:
Entity {
...
id:panel
components: [panelTransform, planeMesh, material, panelPicker]
...
Scene2D {
id: waylandScene
output: RenderTargetOutput { ... }
mouseEnabled: true
entities: [parent]
ShellSurfaceItem { ... }
}
...
}
The program is supposed to, upon Panel creation, link the Scene2D click handler to the ObjectPicker inside the Scene2D class. This however is not done as the Scene2D never executes its internal method when the entities
property is changed.