Black main window after update to 5.15 to 6.8
-
Howdy folks,
We recently updated our application from Qt 5.15.2 to 6.8.0. After tackling some initial CMake/VTK/ITK build issues, I got it up and running again. Right now, everything looks and works perfectly normal on my dev PC, but when we try to run the application on other (test) systems the main window of the UI is fully 'black':
I know the application is up and running, because the tooltips, drop down menu's and dialogs show as they should. I already tried copying all dll's from Qt 6.8.0's bin dir to the app dir on our test PC, but still no worky... Dependeny Walker hangs if I try it, so that doesn't help either.
Has anyone here experienced similar issues or have any ideas on how to solve this issue?
Best regards ever,
Daan -
I was able to fix it (at least on the systems we use for testing) by setting the QVTKOpenGLNativeWidget::defaultFormat() format profile to QSurfaceFormat::CoreProfile instead of QSurfaceFormat::CompatibilityProfile. This seems a bit counter intuitive, since it appears to be more compatible, but I'm happy nevertheless...
auto format = QVTKOpenGLNativeWidget::defaultFormat();
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);