x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

“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

Product Version: UE 4.18
Tags:
more ▼

asked Jan 20 '18 at 06:07 PM in C++ Programming

avatar image

xSheim
125 5 11 18

avatar image vr_marco Jan 20 '18 at 06:32 PM

Did you add the dependencies from UMG and Slate in your Build.cs file?

avatar image xSheim Jan 20 '18 at 08:32 PM

Yes I did.

avatar image xSheim Jan 20 '18 at 08:44 PM

Ok I have solved the issue. .cpp Thanks for your answer.

screenshot-1.png (7.9 kB)
avatar image vr_marco Jan 20 '18 at 08:52 PM

Oh, right! I hadn't noticed you were not calling the constructor of the parent class. You should mark you answer as accepted so others can find it in the future.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The solution: .cpp As @vr_marco said: I had to "call the constructor of the parent class".

screenshot-1.png (7.9 kB)
more ▼

answered Jan 20 '18 at 08:58 PM

avatar image

xSheim
125 5 11 18

avatar image L11777 Feb 15 '19 at 05:31 PM

Why? Why does this need to be done? Under what circumstances does this happen and why?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question