Loading vtk QML components in C++

Dear VTK community,

  • I’m very new to VTK and I am on Windows 11. I’ve been trying to integrate QML into QT. I have installed the VTK with Ninja using Cmake. However, when I want to use the components VTKRenderItem, I get Unknown component error. I have set the QML_IMPORT_PATH in the my CmakeLists.txt.
  • It’s worth mentioning that import VTK 9.3 works fine, but when accessing the module’s components, I get errors. (I have tested QML2_IMPORT_PATH as well, no chance)
  • The address of QML_IMPORT_PATH is set to cmake’s default installation folder: Program files(x86)\VTK\lib\qml (I have copied the contents of this directory into my project’s folder and made QML_IMPORT_PATH point to it. No chance!)

Any resolutions/suggestion would be highly appreciated

Regards

Use QML_IMPORT_TRACE to verify that the import paths are set up correctly.