getting Error: GLEW could not be initialized: Missing GL version

There might be some useful information in the source code for QtQuickVTKRenderWindow in VTK. I notice that it has some code that is specifically for Qt 6.