VTK 8.1 + Qt 5.7 + CMake

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VTK 8.1 + Qt 5.7 + CMake

cristinaluna
Hi all!

I'm trying to run a Qt application using VTK, but I found this errors:

/opt/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QVTKWidget.h:32: error:
vtkGUISupportQtModule.h: No such file or directory

I've found in stackoverflow/vtkforums that I have to enable the option
VTK_Group_Qt in CMAKE in order to install the QVTKWidget.

When I try cmake with this option, I get:

Make Error at
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
   Could NOT find Qt4 (missing: QT_WIDGETS_INCLUDE_DIR QT_WIDGETS_LIBRARY)
   (found version "4.8.7")
 Call Stack (most recent call first):
   /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
   /usr/share/cmake-3.5/Modules/FindQt4.cmake:1333
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   build/lib/cmake/vtk-8.1/Modules/vtkGUISupportQt.cmake:16 (find_package)
   CMake/vtkModuleAPI.cmake:45 (include)
   CMake/vtkModuleAPI.cmake:15 (vtk_module_load)
   CMake/vtkModuleAPI.cmake:155 (_vtk_module_config_recurse)
   CMake/vtkModuleMacros.cmake:432 (vtk_module_config)
   CMake/vtkModuleMacros.cmake:639 (vtk_module_test)
   CMake/vtkTestingMacros.cmake:357 (vtk_module_test_executable)
   GUISupport/Qt/Testing/Cxx/CMakeLists.txt:44 (vtk_test_cxx_executable)


I don't know what to do now, I have the PATHs on my .bashrc and installed
Qt4 too. Do you know how to fix this problem?

Thank you!



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: VTK 8.1 + Qt 5.7 + CMake

Paulo Carvalho
Hello, Cristina !

    Enabling the Qt group is not enough.  You have to set which Qt version you're using.  From your messages, it seems that you have Qt 5 in your system, but CMake is trying to use Qt 4.

     Go back to CMake and set VTK_QT_VERSION to 5.

     Please, address your VTK questions in VTK Discourse: https://discourse.vtk.org/. This mail list will be disabled soon. You're likely to get answers there and you can count on new features.

all the best,

Paulo

Em seg, 1 de jul de 2019 às 04:42, cristinaluna <[hidden email]> escreveu:
Hi all!

I'm trying to run a Qt application using VTK, but I found this errors:

/opt/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QVTKWidget.h:32: error:
vtkGUISupportQtModule.h: No such file or directory

I've found in stackoverflow/vtkforums that I have to enable the option
VTK_Group_Qt in CMAKE in order to install the QVTKWidget.

When I try cmake with this option, I get:

Make Error at
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
   Could NOT find Qt4 (missing: QT_WIDGETS_INCLUDE_DIR QT_WIDGETS_LIBRARY)
   (found version "4.8.7")
 Call Stack (most recent call first):
   /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
   /usr/share/cmake-3.5/Modules/FindQt4.cmake:1333
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   build/lib/cmake/vtk-8.1/Modules/vtkGUISupportQt.cmake:16 (find_package)
   CMake/vtkModuleAPI.cmake:45 (include)
   CMake/vtkModuleAPI.cmake:15 (vtk_module_load)
   CMake/vtkModuleAPI.cmake:155 (_vtk_module_config_recurse)
   CMake/vtkModuleMacros.cmake:432 (vtk_module_config)
   CMake/vtkModuleMacros.cmake:639 (vtk_module_test)
   CMake/vtkTestingMacros.cmake:357 (vtk_module_test_executable)
   GUISupport/Qt/Testing/Cxx/CMakeLists.txt:44 (vtk_test_cxx_executable)


I don't know what to do now, I have the PATHs on my .bashrc and installed
Qt4 too. Do you know how to fix this problem?

Thank you!



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: VTK 8.1 + Qt 5.7 + CMake

cristinaluna
Hello!

Thank you for your response!

I have this option set in cmake, but it seems to still using Qt4 qmake, even if I change it to Qt5.

Cristina Luna
www.cluna.info

> El 1 jul 2019, a las 12:55, Paulo Carvalho <[hidden email]> escribió:
>
> Hello, Cristina !
>
>    Enabling the Qt group is not enough.  You have to set which Qt version
> you're using.  From your messages, it seems that you have Qt 5 in your
> system, but CMake is trying to use Qt 4.
>
>     Go back to CMake and set VTK_QT_VERSION to 5.
>
>     Please, address your VTK questions in VTK Discourse:
> h

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: VTK 8.1 + Qt 5.7 + CMake

Paulo Carvalho
Hello!

  What do you have for Qt5_DIR in CMake?  Mine is  C:/W64/msys64/mingw64/lib/cmake/Qt5
  
  That directory is where the main Qt5 .cmake file is located so that the find*() functions in VTK's CMake script can find everything correctly.

   That directory is usually located where Qt5 libraries and headers were installed or deployed.

cheers,

Paulo

Em ter, 2 de jul de 2019 às 02:43, Cristina Luna Santos <[hidden email]> escreveu:
Hello!

Thank you for your response!

I have this option set in cmake, but it seems to still using Qt4 qmake, even if I change it to Qt5.

Cristina Luna
www.cluna.info

> El 1 jul 2019, a las 12:55, Paulo Carvalho <[hidden email]> escribió:
>
> Hello, Cristina !
>
>    Enabling the Qt group is not enough.  You have to set which Qt version
> you're using.  From your messages, it seems that you have Qt 5 in your
> system, but CMake is trying to use Qt 4.
>
>     Go back to CMake and set VTK_QT_VERSION to 5.
>
>     Please, address your VTK questions in VTK Discourse:
> h


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers