Problem with QML_ELEMENT for classes in subfolder of project
Solved
QML and Qt Quick
-
wrote on 24 Aug 2024, 19:03 last edited by
Hello everyone!
I'm trying to refactoring my old QML Plugins to the new concept which using QML_ELEMENT macro for qml types and I have a problem with it. If my class which I marked as QML_ELEMENT saved in root folder of project all works fine but if I save class to sub folder then I received error like this one:
"shikimorisdk_debug_qmltyperegistrations.cpp:10:10: fatal error: 'shikimoriuianimelistview.h' file not found #include <shikimoriuianimelistview.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~"
I can't undersend how I can fix this or maybe all classes which need to using as qml types must be saves into project root folder?
Thanks for the any help!
-
wrote on 24 Aug 2024, 19:10 last edited by
Try adding your subfolder to the include path, for example: using CMake
target_include_directories(myLib PRIVATE subfolder)
. -
Try adding your subfolder to the include path, for example: using CMake
target_include_directories(myLib PRIVATE subfolder)
. -
1/3