The question looks confusing - you have a problem with selecting OpenGL in Qt, but ask for the help with OCCT.
OCCT doesn't have runtime switcher between OpenGL and OpenGL ES - since OCCT 7.6 you either link application to TKOpenGles for OpenGL ES or to TKOpenGl for desktop OpenGL. Both libraries export the same class OpenGl_GraphicDriver which your application is expected to use, so make sure not to link to both libraries to avoid making things harder to trace.
In your log, it seems that Qt persists in choosing GLES (from the name QRhiGles2, but I'm not quite familiar with the newer versions of Qt). Note that Qt might just ignore QApplication::setAttribute(Qt::AA_UseDesktopOpenGL) without any messages if Qt has been built without Desktop OpenGL support (at least older versions that I've tested), so make sure that Qt in your Linux actually support this mode. You may also try using TKOpenGles in OCCT for testing (but you might need reworking initialization code).
And finally - it would be more productive to share versions of Qt and OCCT frameworks you are actually using, how they have been built (by yourself or somebody else), version of tested systems, some elements of OCCT and Qt initialization code related to 3D Viewer initialization, etc.