C++ Hide mouse cursor while in UserWidget

I can’t seem to find any method to hide the mouse cursor in a c++ user widget. It seems like when you change input mode to UI only the mouse cursor is forced on.

I tried to get the player controller from my pawn and hide the mouse cursor with bShowMouseCursor but this didn’t work.

Seems like the only way to actually hide the mouse cursor is to have it done in blueprint nodes?

Also I plan on changing the mouse cursor to another widget to customize its look, can this be done in C++ or is this blueprint only?

Basically when I drag the mouse I want to hide the cursor during the drag operation