QtVtk icon indicating copy to clipboard operation
QtVtk copied to clipboard

QVTKOpenGLNativeWidget has not been declared

Open haampie opened this issue 5 years ago • 3 comments

I can't build the master version of QtVTK anymore with VTK 8.2.0 and Qt 5.12.3 on Linux:

/home/user/projects/QtVtk/src/QVTKFramebufferObjectRenderer.cpp: In constructor ‘QVTKFramebufferObjectRenderer::QVTKFramebufferObjectRenderer()’:
/home/user/projects/QtVtk/src/QVTKFramebufferObjectRenderer.cpp:28:35: error: ‘QVTKOpenGLNativeWidget’ has not been declared
  QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());

I do have these headers though.

haampie avatar Jun 10 '19 12:06 haampie

Hi guys, Has this been resolved. I just tried to build the project and I am getting this same error when I use VTK 8.2 with external rendering module included and QT 5.13 on windows using visual studio 2017. When I try and add the header file as suggested in this fix it doesn't know where it the header is. Do I need to add a path in environmental settings or similar? Does this problem happen with vtk 8.1?

Thanks in advance

JTray123 avatar Jul 30 '19 09:07 JTray123

The first suggestion worked for me. Double check your include paths.

krigssv1n avatar Jun 23 '21 16:06 krigssv1n

Thank you, when adding headers, it works.

ThreeStones1029 avatar Nov 20 '23 02:11 ThreeStones1029