# VTK 8.90 missing vtkGUISupportQt\_LOADED

**URL:** https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145
**Category:** Development
**Created:** [January 26, 2019, 6:49am UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145 "2019-01-26T06:49:49Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 26, 2019, 6:49am UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/1 "2019-01-26T06:49:49Z")

</div>

I am building VTKExamples standalone and I have noticed that I am getting the message: “VTKWikiExamples: Not building Qt examples”

There is no variable `vtkGUISupportQt_LOADED` being set in the VTK build.  
I changed `VTK_GROUP_ENABLE_QT:WANT` to `VTK_GROUP_ENABLE_QT:YES` and got the same result.

Has there been a name change for `vtkGUISupportQt_LOADED`?

Cc: @ben.boeckel @lorensen

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [January 26, 2019, 4:22pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/2 "2019-01-26T16:22:04Z")

</div>

Andrew,

I think you need something like:

if (TARGET GUISupportQt)

Bill

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [January 26, 2019, 7:33pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/3 "2019-01-26T19:33:29Z")

</div>

Andrew,

I updated the top level CMakeLists.txt file. I can’t get a clean Qt  
build for VTK under the new module system. Can you see if this fixes  
the qt issue?

Thanks,

Bill

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 26, 2019, 9:18pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/4 "2019-01-26T21:18:42Z")

</div>

@bill From what I can see there is no longer a `VTK_QT_VERSION` variable:

```auto
vtkGUISupportQt_LOADED: 
We have GUISupportQt
VTK_VERSION: 8.90.0
VTK_QT_VERSION: 
VTKWikiExamples: Building Qt examples
CMake Error at /usr/local/share/cmake-3.13/Modules/FindQt4.cmake:1313 (message):
  Found unsuitable Qt version "5.12.0" from
  /home/amaclean/Qt/5.12.0/gcc_64/bin/qmake, this code requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:150 (find_package)

```

I also built VTK with `VTK_GROUP_ENABLE_QT:WANT` and `VTK_GROUP_ENABLE_QT:YES`, `VTK_QT_VERSION` remains empty.

In looking at `VTK/Examples/GUI/Qt` only Qt 5.x seems to be supported.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 26, 2019, 9:54pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/5 "2019-01-26T21:54:34Z")

</div>

I don’t have Qt4 so I’m asking the question:

Does VTK 8.90 even build with Qt4?

If it doesn’t then I thought this would work in the top-level CMakeLists.txt file:

```auto
if(vtkGUISupportQt_LOADED OR TARGET VTK::GUISupportQt)
  message(STATUS "VTKWikiExamples: Building Qt examples")
  if (VTK_VERSION VERSION_LESS "8.90.0")
    if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
      # Instruct CMake to run moc automatically when needed.
      set(CMAKE_AUTOMOC ON)
      # We have ui files, this will bring in the macro: qt5_wrap_ui
      find_package(Qt5Widgets REQUIRED QUIET)
    else()
      find_package(Qt4 REQUIRED)
      include(${QT_USE_FILE})
    endif()
  else()
     # Instruct CMake to run moc automatically when needed.
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTOUIC ON)
    find_package(Qt5Widgets REQUIRED QUIET)
  endif()
  add_subdirectory(src/Cxx/Qt)
else()
  message(STATUS "VTKWikiExamples: Not building Qt examples")
endif()
# Is git lfs installed?
file(READ "${WikiExamples_SOURCE_DIR}/src/Testing/Data/GitLfsInstalled" data)

```

However I get `undefined reference to`main’` when building the Qt tests.

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [January 26, 2019, 10:08pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/6 "2019-01-26T22:08:50Z")

</div>

Let’s drop qt4 in the examples.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 26, 2019, 10:36pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/7 "2019-01-26T22:36:02Z")

</div>

I agree, it’s pretty old.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 26, 2019, 11:10pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/8 "2019-01-26T23:10:10Z")

</div>

I’m assuming you will modify the VTKExample CMake files. Let me know when done and I’ll test using vtk 8.90 and vtk 8.2.

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [January 26, 2019, 11:16pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/9 "2019-01-26T23:16:39Z")

</div>

I’ll rip out the qt4 stuff. I can’t test because I’m having trouble  
building with qt on ubuntu and macos.

Bill

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [January 27, 2019, 5:53am UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/10 "2019-01-27T05:53:37Z")

</div>

@lorensen , I downloaded [SideBySideRenderWindowsQt](https://lorensen.github.io/VTKExamples/site/Cxx/Qt/SideBySideRenderWindowsQt/) and got it building with a few modifications on Kubuntu. Here is the modified[CMakeLists.txt](https://discourse.vtk.org/uploads/default/original/1X/250acc007f6c09ef233a140b69d87e52ae181060.txt) (2.4 KB) file that works for VTK 8.90 and VTK 8.2, I also removed the deprecation warnings when using VTK 8.90. Knowing you, you may have already done this 😀, however, if you haven’t, you may be able to create a template for the Qt files from this.

---

<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: [January 28, 2019, 1:17pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/11 "2019-01-28T13:17:34Z")

</div>

> Does VTK 8.90 even build with Qt4?

Qt4 support was removed prior to 8.2 (Nov 2017).

> if (TARGET GUISupportQt)

This should be `if (TARGET VTK::GUISupportQt)`. The unprefixed name is only valid in a build of VTK itself; the namespace version is available everywhere.

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [January 28, 2019, 3:13pm UTC](https://discourse.vtk.org/t/vtk-8-90-missing-vtkguisupportqt-loaded/145/12 "2019-01-28T15:13:54Z")

</div>

Great! I’ll fix it.
