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

**URL:** https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958
**Category:** Support
**Created:** [October 25, 2021, 9:55am UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958 "2021-10-25T09:55:20Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Julienchz](https://discourse.vtk.org/user_avatar/discourse.vtk.org/julienchz/32/4106_2.png) [@Julienchz](https://discourse.vtk.org/u/Julienchz)
#### Post date: [October 25, 2021, 9:55am UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/1 "2021-10-25T09:55:20Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 26, 2021, 10:57pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/2 "2021-10-26T22:57:27Z")

</div>

@sankhesh?

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [October 26, 2021, 11:17pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/3 "2021-10-26T23:17:29Z")

</div>

VTK provides QtQuick/ QML support via the `VTK::GUISupportQtQuick` module. Enable it via cmake while configuring VTK. Take a look at the [module tests](https://gitlab.kitware.com/vtk/vtk/-/tree/master/GUISupport/QtQuick/Testing/Cxx) for example usage.

---

<div class="post-metadata">

### Author: ![bistek](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bistek/32/2344_2.png) [@bistek](https://discourse.vtk.org/u/bistek)
#### Post date: [October 13, 2022, 6:08am UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/4 "2022-10-13T06:08:42Z")

</div>

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

Thanks!

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [October 13, 2022, 12:28pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/5 "2022-10-13T12:28:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Zhengting\_Gan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhengting_gan/32/6674_2.png) [@Zhengting\_Gan](https://discourse.vtk.org/u/Zhengting_Gan)
#### Post date: [February 1, 2024, 8:45pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/6 "2024-02-01T20:45:12Z")

</div>

“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!

---

<div class="post-metadata">

### Author: ![Zhengting\_Gan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhengting_gan/32/6674_2.png) [@Zhengting\_Gan](https://discourse.vtk.org/u/Zhengting_Gan)
#### Post date: [February 1, 2024, 10:13pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/7 "2024-02-01T22:13:42Z")

</div>

[https://docs.vtk.org/en/latest/build\_instructions/index.html](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.

---

<div class="post-metadata">

### Author: ![Zhengting\_Gan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhengting_gan/32/6674_2.png) [@Zhengting\_Gan](https://discourse.vtk.org/u/Zhengting_Gan)
#### Post date: [February 2, 2024, 9:01pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/8 "2024-02-02T21:01:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [February 2, 2024, 9:58pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/9 "2024-02-02T21:58:45Z")

</div>

The [build settings](https://docs.vtk.org/en/latest/build_instructions/build_settings.html) 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](https://discourse.vtk.org/t/how-to-build-vtk-with-qt6-qml-support-and-how-to-build-vtk-examples/13231)

---

<div class="post-metadata">

### Author: ![Zhengting\_Gan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhengting_gan/32/6674_2.png) [@Zhengting\_Gan](https://discourse.vtk.org/u/Zhengting_Gan)
#### Post date: [February 19, 2024, 6:23am UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/10 "2024-02-19T06:23:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![amireza007](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amireza007/32/9203_2.png) [@amireza007](https://discourse.vtk.org/u/amireza007)
#### Post date: [August 21, 2024, 5:01pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/11 "2024-08-21T17:01:11Z")

</div>

> [@sankhesh](#):
>
> VTK\_MODULE\_ENABLE\_VTK\_GUISupportQtQuick

Shouldn’t it be `VTK_MODULE_ENABLE_GUISupportQtQuick`?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 3, 2025, 11:06pm UTC](https://discourse.vtk.org/t/best-way-to-implement-vtk-9-1-with-qt6-using-qml-and-qt-quick/6958/12 "2025-03-03T23:06:05Z")

</div>

No. The first `VTK_` belongs to the `MODULE_`. The second is indicating that it is VTK’s GUISupportQtQuick module. ParaView has `VTK_MODULE_ENABLE_ParaView_…`.
