# VTK qt configuration on Ubuntu

**URL:** https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387
**Category:** Support
**Created:** [September 29, 2023, 1:57am UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387 "2023-09-29T01:57:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Massi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@Massi](https://discourse.vtk.org/u/Massi)
#### Post date: [September 29, 2023, 1:57am UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387/1 "2023-09-29T01:57:34Z")

</div>

Hello,  
I’m trying to setup VTK with Qt5. Do I need qt5Qml + Qt5Quick if I just want to create a small project to display DICOM images. I’m asking that because I have these errors which are blocking me from configuring my VTK

```auto
<pre>Could not use git to determine source version, using version
 CMake Warning at Rendering/OpenGL2/CMakeLists.txt:408 (message):
   X11::Xcursor not found; custom cursors will be ignored.

 Could NOT find Qt5Quick (missing: Qt5Quick_DIR)
 Could NOT find Qt5Qml (missing: Qt5Qml_DIR)
 CMake Warning at CMake/vtkModule.cmake:4787 (find_package):
   Found package configuration file:

     /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake

   but it set Qt5_FOUND to FALSE so package &quot;Qt5&quot; is considered to be NOT
   FOUND. Reason given by package:

   Failed to find Qt5 component &quot;Quick&quot; config file at
   &quot;/usr/lib/x86_64-linux-gnu/cmake/Qt5Quick/Qt5QuickConfig.cmake&quot;

   Failed to find Qt5 component &quot;Qml&quot; config file at
   &quot;/usr/lib/x86_64-linux-gnu/cmake/Qt5Qml/Qt5QmlConfig.cmake&quot;

 Call Stack (most recent call first):
   GUISupport/QtQuick/CMakeLists.txt:17 (vtk_module_find_package)

 CMake Error at CMake/vtkModule.cmake:4793 (message):
   Could not find the Qt5 external dependency.
 Call Stack (most recent call first):
   GUISupport/QtQuick/CMakeLists.txt:17 (vtk_module_find_package)

 Configuring incomplete, errors occurred!
</pre>

```

---

<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: [September 30, 2023, 3:56pm UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387/2 "2023-09-30T15:56:48Z")

</div>

If you don’t need QtQuick support, you can pass `-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick=NO`. Otherwise you’ll need to install the QtQuick and QtQml libraries installed as well.

---

<div class="post-metadata">

### Author: ![Massi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@Massi](https://discourse.vtk.org/u/Massi)
#### Post date: [October 1, 2023, 3:20am UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387/3 "2023-10-01T03:20:10Z")

</div>

Where and how to add this option?  
I’m on Linux machine and I only have this config options. I cant find DVTK\_MODULE\_ENABLE\_VTK\_GUISupportQtQuick field even in advance mode

```auto
                                                     Page 1 of 1
 BUILD_SHARED_LIBS ON
 CMAKE_BUILD_TYPE Release
 CMAKE_INSTALL_PREFIX /usr/local
 OPENGL_GLES2_INCLUDE_DIR /usr/include
 OPENGL_GLES3_INCLUDE_DIR /usr/include
 Qt5Core_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5Core
 Qt5Gui_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5Gui
 Qt5OpenGL_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL
 Qt5Qml_DIR Qt5Qml_DIR-NOTFOUND
 Qt5Quick_DIR Qt5Quick_DIR-NOTFOUND
 Qt5Sql_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5Sql
 Qt5Widgets_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
 Qt5_DIR /usr/lib/x86_64-linux-gnu/cmake/Qt5
 Qt6_DIR Qt6_DIR-NOTFOUND
 VTK_BUILD_DOCUMENTATION OFF
 VTK_BUILD_EXAMPLES OFF
 VTK_BUILD_SCALED_SOA_ARRAYS OFF
 VTK_BUILD_SPHINX_DOCUMENTATION OFF
 VTK_BUILD_TESTING OFF
 VTK_EXTRA_COMPILER_WARNINGS OFF
 VTK_GROUP_ENABLE_Imaging DEFAULT
 VTK_GROUP_ENABLE_MPI DONT_WANT
 VTK_GROUP_ENABLE_Qt YES
 VTK_GROUP_ENABLE_Rendering WANT
 VTK_GROUP_ENABLE_StandAlone WANT
 VTK_GROUP_ENABLE_Views DEFAULT
 VTK_GROUP_ENABLE_Web DEFAULT
 VTK_QT_VERSION Auto
 VTK_SMP_IMPLEMENTATION_TYPE Sequential
 VTK_USE_CUDA OFF
 VTK_USE_LARGE_DATA OFF
 VTK_USE_MEMKIND OFF
 VTK_USE_MPI OFF
 VTK_WRAP_JAVA OFF
 VTK_WRAP_PYTHON OFF
 X11_xcb_xkb_INCLUDE_PATH X11_xcb_xkb_INCLUDE_PATH-NOTFOUND

```

---

<div class="post-metadata">

### Author: ![Massi](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@Massi](https://discourse.vtk.org/u/Massi)
#### Post date: [October 1, 2023, 3:50am UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387/4 "2023-10-01T03:50:39Z")

</div>

fine I managed to install QML and QUICK with this command: ```  
sudo apt-get install qtdeclarative5-dev

```auto

```

---

<div class="post-metadata">

### Author: ![Yang\_Tianxi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yang_tianxi/32/8793_2.png) [@Yang\_Tianxi](https://discourse.vtk.org/u/Yang_Tianxi)
#### Post date: [April 25, 2024, 3:58pm UTC](https://discourse.vtk.org/t/vtk-qt-configuration-on-ubuntu/12387/5 "2024-04-25T15:58:29Z")

</div>

It works for me
