On my system I ported the current osgQt master branch code to build with Qt 6. The changes required include:
- A few updates in OSGRenderer.cpp that are back-compatible with Qt 5 so this could be merged into the current master branch by itself.
- CMake file
Qt5 to Qt6 and various other updates.
The CMake side is messier:
- I did not bother keeping Qt 4 and 5 support in my CMake files so I can't currently do a PR to osgQt master but maybe it could live on a
Qt6 branch for now until we merge the CMake bits (if that is what we want to do).
- Keeping Qt 4 CMake support in there doesn't make sense since the old Qt 4 osgQt approach was removed but I'd vote for bringing it back in since it works with Qt 5 (but not Qt 6 since QGLWidget was removed).
- All but one of the examples still depend on the now-removed Qt 4 osgQt approach: they should be ported or removed unless the Qt 4 approach is reintegrated.
In summary, the C++ changes are simple but adding Qt 6 support to the CMake setup is kind of messy. It doesn't make sense to contribute here until there is a consensus on how best to add Qt 6 support and whether to resurrect the Qt 4 approach. Maybe separate osgQt4, osgQt5, and osgQt6 repos would be a better way to go. This/these should also be made a proper OSG companion project with releases tagged and in sync with the OSG version number. Since I got the discussion going on problems with osgQt and Qt versions that contributed to splitting out osgQt I am willing to contribute to making these improvements.
On my system I ported the current osgQt master branch code to build with Qt 6. The changes required include:
Qt5toQt6and various other updates.The CMake side is messier:
Qt6branch for now until we merge the CMake bits (if that is what we want to do).In summary, the C++ changes are simple but adding Qt 6 support to the CMake setup is kind of messy. It doesn't make sense to contribute here until there is a consensus on how best to add Qt 6 support and whether to resurrect the Qt 4 approach. Maybe separate osgQt4, osgQt5, and osgQt6 repos would be a better way to go. This/these should also be made a proper OSG companion project with releases tagged and in sync with the OSG version number. Since I got the discussion going on problems with osgQt and Qt versions that contributed to splitting out osgQt I am willing to contribute to making these improvements.