79342740

Date: 2025-01-09 13:19:32
Score: 1
Natty:
Report link

I am trying to add common custom QML controls to my project in the same way, i.e. I have my QmlModule folder outside the project. I found the Qt documentation did not go far enough in terms of fully worked examples for what is quite a complex subject. My problem was that it failed to load the plugin library AT RUNTIME, even though the DLL named in the error message was present. I followed Jürgen Lutz's DemoApp and worked out that the critical missing step was

target_link_libraries(${EXECUTABLE_NAME} PRIVATE myComponentTarget)

in my application CMakeLists.txt. Note that this is the library named in the plugin's CMakeLists.txt

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Matthew Jones