What is the proper way to setting a child actor class of a child actor component?

I want to create a C++ based child actor component and set the child actor class of this component in the actor I added. Also want to do this during the constructor time so I can edit it in the inherited blueprint actor editor window I. I tried the default constructor but when I do that I get an error when opening the packaged project.I can also do this inside my custom child actor component, but I don’t know how to do it either. What is the proper way to do this ?