# is there any good tutorial how to use QML+VTK with visual studio

**URL:** https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325
**Category:** Support
**Created:** [February 16, 2024, 7:34am UTC](https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325 "2024-02-16T07:34:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gzt036](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gzt036/32/5960_2.png) [@gzt036](https://discourse.vtk.org/u/gzt036)
#### Post date: [February 16, 2024, 7:34am UTC](https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325/1 "2024-02-16T07:34:36Z")

</div>

I could not figure out a good way to setup this in visual studio 2022.  
Ideally, I would like to use vs2022 to edit and debug the code and use qtcreator to edit and live preview qml file. Appreciate if someone could help to point out how to do this. Thank!

---

<div class="post-metadata">

### Author: ![gzt036](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gzt036/32/5960_2.png) [@gzt036](https://discourse.vtk.org/u/gzt036)
#### Post date: [February 16, 2024, 8:41am UTC](https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325/2 "2024-02-16T08:41:31Z")

</div>

tried a github project QuickVtk, and it always fails to build with the message, why would this happen

D:\zqt\QuickVtk-master\src\Lib\Vtk\Viewer\quickVtkFboOffscreenWindow.hpp(6,10): error C1083: Cannot open include file: ‘vtkExternalOpenGLRenderWindow.h’: No such file

---

<div class="post-metadata">

### Author: ![LucasGandel](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lucasgandel/32/1831_2.png) [@LucasGandel](https://discourse.vtk.org/u/LucasGandel)
#### Post date: [February 16, 2024, 2:03pm UTC](https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325/3 "2024-02-16T14:03:27Z")

</div>

vtkExternalOpenGLRenderWindow comes with the VTK RenderingExternal module that is not enabled by default IIRC. Enabling it in VTK’s CMake configuration should fix the issue.  
AFAIK QuickVtk is not an official project maintained by Kitware, you should rather give a try to the official VTK example: [https://gitlab.kitware.com/vtk/vtk/-/tree/master/Examples/GUI/QML/QtQuickCone?ref\_type=heads](https://gitlab.kitware.com/vtk/vtk/-/tree/master/Examples/GUI/QML/QtQuickCone?ref_type=heads)

---

<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:27am UTC](https://discourse.vtk.org/t/is-there-any-good-tutorial-how-to-use-qml-vtk-with-visual-studio/13325/4 "2024-02-19T06:27:36Z")

</div>

Thanks Lucas, now I am able to build QTQuickCone and some other examples with Cmake and visual studio. will check issues with vtkExternalOpenGLRenderWindow.h later.
