The idea in one diagram
Treat the interaction as three separate jobs. The source item requests drag detection. A DragDropOperation carries the information needed to identify the item. The destination slot validates the operation and asks the inventory to move or swap the data.
1. Give each widget a clear responsibility
For this example, use WBP_InventoryItem for the item view, WBP_InventorySlot for a destination, and WBP_DragPreview for the temporary visual under the pointer. Create BP_InventoryDragOperation as a subclass of DragDropOperation. Add a SourceSlotId variable to that custom operation. These names and this division are choices for the example.
2. Detect the drag on the item
In the item widget, override OnMouseButtonDown. Pass its MouseEvent into Detect Drag if Pressed and select Left Mouse Button as the drag key. Connect that node's return value to the override's return value. Override OnDragDetected to create the operation once drag detection begins.
OnMouseButtonDown
→ Detect Drag if Pressed
Pointer Event = MouseEvent
Drag Key = Left Mouse Button
→ Return Value
OnDragDetected
→ Create WBP_DragPreview
→ Create Drag & Drop Operation
Class = BP_InventoryDragOperation
Payload = ItemData (a UObject)
Default Drag Visual = DragPreview
→ Set SourceSlotId on the operation
→ Return the operation3. Carry data, not just an icon
Use Payload for an object representing the item. A plain Blueprint struct is not a UObject; if your inventory uses structs, pass a suitable object reference or use fields on your custom operation to identify the source entry. Default Drag Visual is the temporary widget shown during dragging. Its appearance does not replace the inventory's underlying data.
4. Let the destination decide
In the destination slot, override OnDrop. Cast Operation to BP_InventoryDragOperation, read the item and SourceSlotId, and validate the destination. In this example, a valid drop requests a move or swap in the inventory model, then refreshes the affected slot views. Return true after handling it; return false when the destination does not accept it.
If the interaction does not work
If no drag begins, inspect the mouse event reply and verify which widget receives the input. If the target never receives a drop, check its hit-test behavior and any overlapping widgets. If the icon moves but the item does not, inspect the inventory update rather than the drag visual.