Answer the question
In order to leave comments, you need to log in
Qt, when registering a C++ QML element, substitutes the wrong C++ class path into the assembly. What to do?
Hello!
I'm trying to register a C++ class as a QML component by adding a QML_ELEMENT macro to it in the description.
The .h and .cpp class files are in a different folder from main.cpp. And MOC, during the build of the project, substitutes the path to the C ++ class file, as if it were next to main.cpp. Ie:
Registering the class
Location of the class files and main.cpp
Error that the assembler writes:
The place where the error occurs, and what path the assembler substitutes:
I.e. the collector simply substitutes the wrong path to the C++ class. What can be done with this, besides just manually editing the file path and moving the file to the same folder as main.cpp ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question