I am trying to integrate a VTK render window in a Qt GUI. Using QtCreator/Designer, I added an openGLWidget to the MainWindow and promoted it to QVTKOpenGLWidget. When I try to compile, the compiler does not find the header "QVTKOpenGLWidget.h". After I manually added this header to the project, the linker apparently does not find the right library and gives the error:
/home/christian/InSync/Tmp/build-Viewer3D-Desktop_f4eeec-Debug/ui_mainwindow.h:42: error: undefined reference to `QVTKOpenGLWidget::QVTKOpenGLWidget(QWidget*, QFlags)'
I added first the vtk libraries that appeared most likely to contain QVTKOpenGLWidget, later ALL vtk libraries, but the problem persists. I would greatly appreciate ideas on how to make this minimal example work.
I am using Qt 5.9.5 and VTK 7.1
Thanks, Chris