Using Qt with OpenGl

Thanks for the info! Note that CMAKE_INSTALL_PREFIX is where Geant4 (or the package being built) will be installed if you do make install. CMAKE_PREFIX_PATH is a set of paths under which CMake will search for dependencies of the one being built. SO in this case, CMAKE_PREFIX_PATH should be set to /usr/local/Qt-5.12.7.

However, as the CMake configuration showed, Geant4 did pick up Qt at the configuration step, so should have been compiled with support. Building exampleB1 against that should then use Qt by default, but @Allison and @lgarnier can confirm that.

All I can suggest is to confirm that you are using the expected build/install of Geant4 when building exampleB1. If that’s right, then find the file named Geant4Config.cmake under the build/install prefix for that Geant4, and find the section beginning:

# - Qt (UI and Vis!)
set(Geant4_qt_FOUND ...)

Geant4_qt_FOUND should be ON or similar, and there should also be a variable Geant4_USES_QT5 set to ON or similar. Check those first, and we can then see if the issue is with the Geant4 build/install, or that of the example.