[C++] How to setup child actor component in the constructor?

I was wondering how to setup child actor components in C++ and have them correctly exposed in Blueprint.

My current code is:

SCharacter.h

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
UChildActorComponent* GunSlot;

SCharacter.cpp

GunSlot = CreateDefaultSubobject<UChildActorComponent>(TEXT("GunSlot"));
GunSlot->SetChildActorClass(ASWeapon::StaticClass());
GunSlot->SetupAttachment(GetMesh());

The problem is none of the details are exposed:

Desired solution (Done in BP):

My goal is to learn C++ and keep BP usage minimal.

Try EditAnywhere instead of VisibleAnywhere

It somewhat worked, I just don’t have access to as much details. I figured out how to attach the weapon to a socket in C++. But, I’m still looking to see if what I want is possible.

Thanks Ali