How can I get components declared in C++ to show up in components tab in BP editor?

After declering subobject in header file you do this in constructor of class:

PlayerCameraComponent = PCIP.CreateDefaultSubobject<UCameraComponent>(this, TEXT("Camera"));
//set up settings, you need to set one or else you will get error
PlayerCameraComponent->SetRelativeLocation(FVector(100, 0, 0);
////
RootComponent = PlayerCameraComponent;

Now this will make component a root component, if you already have root component you need to use this insted of last line:

AddComponent(FName("Camera"), false, FTransform(), NULL);

In FName you use same name you used in first line