How to set widget using ConstructorHelpers?

Ok so I’ve managed to make it work but I don’t know why. I just loaded it up, replaced a few things and it just decided to work for some reason. Here’s the solution but it’s a solution I’ve tried in the past so I don’t know why it works now.
TargetDummy.h

TSubclassOf<UUserWidget> WidgetBPContainer;

TargetDummy.cpp(Constructor):

static ConstructorHelpers::FClassFinder<UUserWidget> WidgetContainer(TEXT("WidgetBlueprint'/Game/TargetDummyWidgets/LockOnIndicatorWidgetBP.LockOnIndicatorWidgetBP_C'"));
	if (WidgetContainer.Succeeded())
	{
		WidgetBPContainer = WidgetContainer.Class;
	}

I used TSubclassOf instead of UUserWidget* as in the cpp file there’s no suitable conversion function to convert from UUserWidget* to TSubclassOf could anyone explain this to me?

Again thanks to @3dRaven for all the help and support, you helped tons and I am forever grateful, you’re amazing!