Current mouse cursor during drag operation

Hi,

I’ve implemented Drag & Drop for one widget blueprint using a DragDropOperation object. This is working nice but the player controller always uses the default mouse cursor during the dragging. Even when it’s not the default cursor specified in the player controller.

Does anyone have an idea how to change this? I’ve tried setting the current mouse cursor in the OnDragDetected event but this doesn’t work.

I have the same problem. I have found this:

FCursorReply FDragDropOperation::OnCursorQuery()
{
if ( MouseCursorOverride.IsSet() )
{
return FCursorReply::Cursor( MouseCursorOverride.GetValue() );
}

	if ( MouseCursor.IsSet() )
	{
		return FCursorReply::Cursor(MouseCursor.GetValue());
	}

	return FCursorReply::Unhandled();
}

FCursorReply FUMGDragDropOp::OnCursorQuery()
{
	FCursorReply CursorReply = FGameDragDropOperation::OnCursorQuery();

	if ( !CursorReply.IsEventHandled() )
	{
		CursorReply = CursorReply.Cursor(EMouseCursor::Default);
	}

Problem is that the Blueprint DragAndDropOperation is a UDragAndDropOperation and not a FDragAndDropOperation so we have no way to override the mouse cursor… Maybe it will help you.

I have the same problem, and I don’t think there is any workaround, so I fixed it by modifying the engine code.
Here is my pull request.
https://github.com/EpicGames/UnrealEngine/pull/11337/

In project settings there is an option for setting the cursor design using a widget. Making this empty also can ‘hide’ the cursor. (‘Empty’ being the created widgetbp)

image

and in the case of just using the standard cursor, when dragging a widget I would like it to change to the hand cursor and when releasing it to return to the default, I tried to do it here but when I try to drag it continues with the default cursor then after I release it it changes to the hand cursor