Which Qt and VTK for QVTKOpenGLWidget?

Hi Mathieu,
The compile error is with my own program. I haven’t managed to get to the build stage yet with the Events example, because when I run cmake I get this error:

CMake Error at CMakeLists.txt:46 (add_executable):
Target “qtevents” links to target “Qt5::X11Extras” but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

Based on this info from Marcus Hanwell: https://blog.kitware.com/cmake-finding-qt5-the-right-way/
I tried adding this:

set(Qt5_DIR ~/Qt5.13.0/5.13.0/gcc_64/lib/cmake/Qt5 )
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)

since that directory contains Qt5Config.cmake, but the same error occurs. Do you know what I need to do to ensure that cmake finds X11Extras? The library libQt5X11Extras.so is present with all the other Qt5 libraries.

(I get the same cmake error with the SimpleView example. With the ImageViewer example I get that the vtkTestingCore module is not available - I guess I didn’t build it.)

Thanks.

Edit: If I ignore the cmake error and run make anyway, I get many warnings about QVTKWidget being deprecated, then this link error:
[100%] Linking CXX executable qtevents
/usr/bin/ld: cannot find -lQt5::X11Extras
collect2: error: ld returned 1 exit status

Presumably there is a way to tell cmake where to find libQt5X11Extras.so, but it seems to be looking for a different name - libQt5::X11Extras.so. I don’t know how to treat that ‘Qt5::’.

Edit!!!
I discovered that the build was not using the Qt installation that I intended, which led to the discovery that I hadn’t built VTK-8.2 with Qt-5.13.0 (an earlier Qt installation was being used). Rebuilding VTK-8.2 with the right Qt fixed the example build problem (after I added X11Extras to the find-package list) - the Events example now works. I still have to sort out my own program