I struggled with this problem for a long time, and it turns out it is a issue with the project's CMakeLists.txt.
I'll post here the wrong and correct versions for anyone who is struggling with the same problem:
WRONG:
cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
project (pcl-visualizer)
find_package (Qt5Wodgets)
find_package (VTK REQUIRED)
find_package (PCL 1.8 REQUIRED)
include_directories (${PCL_INCLUDE_DIRS})
link_directories (${PCL_LIBRARY_DIRS})
add_definitions (${PCL_DEFINITIONS})
set (project_SOURCES main.cpp pclviewer.cpp)
set (project_HEADERS pclviewer.h)
set (project_FORMS pclviewer.ui)
set (VTK_LIBRARIES vtkRendering vtkGraphics vtkHybrid QVTK)
QT5_WRAP_CPP (project_HEADERS_MOC ${project_HEADERS})
QT5_WRAP_UI (project_FORMS_HEADERS ${project_FORMS})
ADD_DEFINITIONS (${QT_DEFINITIONS})
ADD_EXECUTABLE (pcl_visualizer ${project_SOURCES}
${project_FORMS_HEADERS}
${project_HEADERS_MOC})
TARGET_LINK_LIBRARIES (pcl_visualizer ${PCL_LIBRARIES} ${VTK_LIBRARIES} ${QT_LIBRARIES})
CORRECT:
cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
project (pcl-visualizer)
find_package (Qt5 REQUIRED COMPONENTS Widgets Core)
find_package (VTK REQUIRED)
find_package (PCL 1.8 REQUIRED)
include_directories (${PCL_INCLUDE_DIRS})
link_directories (${PCL_LIBRARY_DIRS})
add_definitions (${PCL_DEFINITIONS})
set (project_SOURCES main.cpp pclviewer.cpp)
set (project_HEADERS pclviewer.h)
set (project_FORMS pclviewer.ui)
QT5_WRAP_CPP (project_HEADERS_MOC ${project_HEADERS})
QT5_WRAP_UI (project_FORMS_HEADERS ${project_FORMS})
ADD_DEFINITIONS (${QT_DEFINITIONS})
ADD_EXECUTABLE (pcl_visualizer ${project_SOURCES}
${project_FORMS_HEADERS}
${project_HEADERS_MOC})
TARGET_LINK_LIBRARIES (pcl_visualizer ${PCL_LIBRARIES})
qt5_use_modules (pcl_visualizer Widgets)
I'm not 100% sure about the reason of the problem, but my guess is that libQVTK and such was replaced in qt5 by the Qt5Widgets module (I wonder what libraries it refers to), making the old libraries unavailable and unneeded.