# Building VTK with Qt6

**URL:** https://discourse.vtk.org/t/building-vtk-with-qt6/12534
**Category:** Support
**Created:** [October 25, 2023, 8:10am UTC](https://discourse.vtk.org/t/building-vtk-with-qt6/12534 "2023-10-25T08:10:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jan\_Vlach](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jan_vlach/32/7875_2.png) [@Jan\_Vlach](https://discourse.vtk.org/u/Jan_Vlach)
#### Post date: [October 25, 2023, 8:10am UTC](https://discourse.vtk.org/t/building-vtk-with-qt6/12534/1 "2023-10-25T08:10:47Z")

</div>

Hello, i have been trying to build vtk with qt6 gui support, but when generating project, cmake allways fails.

CMake err CMake Warning at CMake/vtkModule.cmake:4787 (find\_package): Could not find a configuration file for package “Qt6” that is compatible with requested version “5.9”.

The following configuration files were considered but not accepted:

```auto
C:/.conan/a815ad/1/build/generators/Qt6Config.cmake, version: 6.6.0

```

Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:43 (vtk\_module\_find\_package)

CMake Error at CMake/vtkModule.cmake:4793 (message): Could not find the Qt6 external dependency. Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:43 (vtk\_module\_find\_package)

– Configuring incomplete, errors occurred!

Iam not sure why qt gui support tries to find Qt event with qt6 specified, but with version 5.9 (maybe from qt5 days?)

Build settings: VTK\_SMP\_IMPLEMENTATION\_TYPE=sequential VTK\_QT\_VERSION=6 VTK\_GROUP\_ENABLE\_Qt=YES VTK\_GROUP\_ENABLE\_Rendering=YES VTK\_MODULE\_ENABLE\_VTK\_RenderingContextOpenGL2=YES VTK\_MODULE\_ENABLE\_VTK\_GUISupportQtQuick=DONT\_WANT

Thanks for reply!

---

<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 25, 2023, 8:44pm UTC](https://discourse.vtk.org/t/building-vtk-with-qt6/12534/2 "2023-10-25T20:44:55Z")

</div>

Please make sure that you have all the necessary Qt libraries installed. VTK needs Qt6Widgets, Qt6OpenGL, Qt6OpenGLWidgets at a minimum.

---

<div class="post-metadata">

### Author: ![ataban](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/c5a1d2/32.png) [@ataban](https://discourse.vtk.org/u/ataban)
#### Post date: [September 27, 2024, 9:10am UTC](https://discourse.vtk.org/t/building-vtk-with-qt6/12534/3 "2024-09-27T09:10:27Z")

</div>

> [@Jan\_Vlach](#):
>
> vtk\_module\_find\_package

i am using vtk 9.3.1 , getting error - vtk\_module\_find\_package - unknown tag while configuring using cmake 3.30

---

<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: [September 27, 2024, 4:25pm UTC](https://discourse.vtk.org/t/building-vtk-with-qt6/12534/4 "2024-09-27T16:25:22Z")

</div>

Please create a new topic with details about what cmake parameters you’re using to build vtk and what error you’re gettting.
