How can I completely hide the cursor when widget is focused?

I’m using the Shooter Game (ChatWidget) chat client as a reference for the chat client I’m trying to make. An issue I am having is flickering of the cursor (due to trying to the call trying to hide it in Tick() and some other call being made to draw it). This flickering can also be noticed in the player menu when escape is pressed. Is there any way to hide the cursor without flickering? Thanks.

Okay, I played around a little more and found the solution:

Remove the line FSlateApplication::Get().GetPlatformApplication().Get()->Cursor->SetType( EMouseCursor::None );

When your keyboard focuses on the editable text box call:

FSlateApplication::Get().GetPlatformApplication().Get()->Cursor->Show(false);

When you set focus back to the game viewport ( i.e FSlateApplication::Get().SetFocusToGameViewport(); ) call:

FSlateApplication::Get().GetPlatformApplication().Get()->Cursor->Show(true);

I also ended up stripping functionality out of Tick() and placing them in other functions that only needed to be called once.