Search code examples
c++constructorwidgetunreal-engine4

Unreal Engine 4.18.2 "no default constructor exists for class "UUserWidget""


I have experienced a strange issue writing the constructor of UUserWidget-inherited class. The problem appears only (checked in several other) in this class. Code: .h .cpp UserWidget.h CompilingResult


Solution

  • Try to add this to your base class (UUserWidget):

    UUserWidget();
    

    That's because there is no default constructor for this class. The default constructor is one which takes no parameters.