Best way to implement VTK 9.1 with Qt6 using QML (and Qt Quick...)

Hello everyone,
I want to implent VTK 9.1 with Qt6 in a QtQuick project, whats is the best way to proceed ? Qt6 suggests using QRhi and QSGMaterialShader for handling graphical APIs (for better abstraction) like OpenGl or Vulkan, but is this also applicable to VTK? How to use a QQuickWindow to render with VTK but without using QQMLApplication engine?
Thanks for your help

@sankhesh?

VTK provides QtQuick/ QML support via the VTK::GUISupportQtQuick module. Enable it via cmake while configuring VTK. Take a look at the module tests for example usage.

1 Like

Hello, do you have any suggestions/examples on how to use Qt6, QML, QtQuick in a VTK Python project?

Thanks!

@bistek, I don’t think so. If you do investigate and get it up and running, please consider contributing the example to vtk.

“Enable it via cmake while configuring VTK”, how do you configure it to enable it, could you elaborate, hard to find document on this. thanks!

https://docs.vtk.org/en/latest/build_instructions/index.html

build instruction has no mention of any customized or advanced configuration features. why is that, considering vtk a package of many years of development.

new to the c++ VTk, could someone help on this. Thanks.

The build settings page goes into more details for enabling/disabling modules. You can enable the module via CMake option VTK_MODULE_ENABLE_VTK_GUISupportQtQuick:STRING=YES.

And please start a new topic for new questions.
Edit: I see that you posted here: how to build vtk with qt6 qml support, and how to build vtk examples

thanks. still warming up on QT/VTK/CMake, it seems checking advanced option in Cmake app enables the showing of these options.