How to specify the Drop Target for Drag and Drop In single Widget.

I want to have a drop detection within a limited area of ​​a single widget.
As you know, the OnDrop event is triggered on the entire Widget.
I would like this to trigger on a Panel in the Widget.
I could probably create a separate widget just for OnDrop event, but I think this would be excess.

I think this would be excess

I don’t think there another way, tbh. Create a user widget with the desired size and implement the onDrop there. Other than that, you would have to manually calculate relative position inside the widget. Doable but seems over the top.


Depending on the scope / complexity, I would add a native Named Slot widget and fill it with a onDrop handling child. This will at least give you some modularity and design granularity.

I assumed that was the case as I had searched and could not find a way to do it.
But it seems weird to create a separate Dropbox just for Dropbox.
I wanted to reduce the Widget hierarchy as much as possible, but this is my only option if no other viable solution existed.
Thank you for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.