QVTKWidget.h after VTK 7.1.1 install


I installed VTK 7.1.1 on two systems (raspberry pi os and ubuntu 16). On the first system (raspberry pi os) everything works fine and my project builds in qt with cmake. Now I want to move the project to another computer and tried building it, but I get the following error:

-- Configuring done

-- Generating done

-- Build files have been written to: /home/dan/PCLViewer/build

15:53:22: The process "/usr/bin/cmake" exited normally.

15:53:22: Starting: "/usr/bin/make" -j12

[ 20%] Automatic moc, uic and rcc for target PCLViewer

Generating ui_pclviewer.h

Generating moc_pclviewer.cpp

[ 20%] Built target PCLViewer_automoc

Scanning dependencies of target PCLViewer

[ 40%] Building CXX object CMakeFiles/PCLViewer.dir/main.cpp.o

[ 60%] Building CXX object CMakeFiles/PCLViewer.dir/pclviewer.cpp.o

[ 80%] Building CXX object CMakeFiles/PCLViewer.dir/PCLViewer_automoc.cpp.o

In file included from /home/dan/PCLViewer/src/pclviewer.cpp:2:0:

/home/dan/PCLViewer/build/ui_pclviewer.h:28:24: fatal error: QVTKWidget.h: No such file or directory

compilation terminated.

CMakeFiles/PCLViewer.dir/build.make:86: recipe for target 'CMakeFiles/PCLViewer.dir/pclviewer.cpp.o' failed

make[2]: *** [CMakeFiles/PCLViewer.dir/pclviewer.cpp.o] Error 1

make[2]: *** Waiting for unfinished jobs....

CMakeFiles/Makefile2:803: recipe for target 'CMakeFiles/PCLViewer.dir/all' failed

make[1]: *** [CMakeFiles/PCLViewer.dir/all] Error 2

Makefile:94: recipe for target 'all' failed

make: *** [all] Error 2

15:53:37: The process "/usr/bin/make" exited with code 2.

Error while building/deploying project PCLViewer (kit: Desktop)

When executing step "Make"

I installed VTK like this:
Terminal: wget https://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz
•Extract the folder in Downloads
•Terminal: cd VTK-7.1.1
•Terminal: mkdir build
•Terminal: cd build
•Terminal: cmake …
•Terminal: make
•Terminal: sudo make install

The system on which it is running has QVTKWidget.h under /usr/include/vtk-7.1, but on the other system this file seems to be missing after the installation.

I am assuming that this is the reason for the error. Any help would be appreciated.



What options did you pass to cmake to build VTK? You at least need to enable the GUISupportQtOpenGL module (IIRC).

Enabeling vtk-group-qt helped!