How to create a widget blueprint based on a C++ Widget?

And to answer your side question yes, parenting is pretty much the same in many languages, in C++ the child gets treated pretty much the same as in Java, some caveats are: C++ can extend from multiple classes, never do that, instead use interfaces. If you wish to override functions from the parent you must make use of virtual functions, it’s not anymore about having protected or public members being able to be overridden (though that also counts).

There are of course many other things about C++ classes, but from a very high level and you coming from Java, those two are the first ones that comes to my mind, hope this helps!

Hi,

So in my project, I have a C++ class that I’ll call, whose parent class is unreal’s . In my project, has some predefined events that it’s listening for, and if I were to add any widgets, I would need to have as the parent for that widget. So, I’ve created a widget called which treats as the parent class. I did this by right clicking on in the unreal editor, and then clicking on create a C++ class based on.

After I’ve coded up the contents of .h/.cpp, I go to the C++ folder in my unreal editor, right click it, and then “Create Blueprint Class Based on Based on”, I call it , and save it somewhere in my contents directory.

The problem: isn’t recognized by unreal as a widget blueprint, it’s only treated like a blueprint. That’s a problem because I want to go to the designer part of the blueprint editor to add graphics and stuff to the blueprint.

I believe the way that I am creating a child blueprint class out of must be wrong. So, if you have a base widget that has as a parent, is there a way to make a child widget out of that such that the child is also a widget?

Side question (not that important):
If a c++ class is a parent of another c++ class, is this similar to how java class can be the superclass of another java class? I’m a lot more familiar with Java, so this is how I think of parenting in C++: I think of it as a way of having inheritance in the language.

Create a normal Widget. Open, switch to graph, click Edit Class Defaults, Reparent to YourNetworkWidget

Nachtmahr: Thanks a lot, that solved the issue I had.

nullbot: that does clarify things and gives me a starting point, thanks! :smiley: