Migrate Qt5 to Qt6
Tracking issue for tasks required to migrate from Qt5 to Qt6.
- [ ] CMake Updates
- [ ] Update MinimalScene for new APIs getting native access to VkImage and Metal equivalent.
- [ ] QtGraphicalEffects is deprecated and has some incompatibilities: https://doc.qt.io/qt-6/qtgraphicaleffects5-index.html
- [ ] QRegExp is deprecated: https://doc.qt.io/qt-6/qregexp.html
Environment: Ubuntu Noble + Gazebo Ionic + Qt6 + https://github.com/gazebosim/gz-gui/pull/596/ + https://github.com/gazebosim/gz-sim/pull/2305/
Initial test: gz sim minimal_scene.sdf
Goals
- Make Gz Ionic work with Qt5/Qt6
- Backport Qt5 changes to Harmonic
Tasks
- [ ] Update our gz gui CI action to use Ubuntu Noble.
- [ ] Forward port
gz-qui8tomain.
Ideas
- [ ] Load our qml codebase into Qt Creator / GammaRay to detect issues.
Current list of issues:
- [ ] GzSpinBox. Replace it with a textbox widget.
- [ ] TreeViewStyle not available in Qt6 qml .
- [ ] Review if
QtQuick.Controls 1.xis used and identify the replacement if any. - [x]
[GUI] [Err] [Gui.cc:326] Failed to instantiate custom drawer, drawer will be empty. - [x] (fixed) Confirm if there's a segfault when running
gz sim shapes.sdforgz sim minimal_scene.sdf. - [ ] Propagate the changes made in gz-gui to compile plugins as modules.
- [ ] 3D scene window not working. Minimal example to load a 3D scene:
* https://doc.qt.io/qt-6/debug.html
* There's a useful example in gz-rendering:
examples/simple_demo_qml. * 1st test: LoadMinimalSceneonly and create a<scene>element within<world>to change the background color. * 2nd test: Create an SDF withMinimalScene (gz-gui)andSceneManager (gz-sim).
Compatible changes between qt5+qt6: https://github.com/gazebosim/gz-gui/pull/598
Clazy checks: https://github.com/gazebosim/gz-gui/pull/584
Bulk of the migrations for gui: https://github.com/gazebosim/gz-gui/pull/596
Here's the list of qt6 packages I needed to install:
- qml6-module-qt-labs-folderlistmodel
- qml6-module-qt-labs-platform
- qml6-module-qt-labs-settings
- qml6-module-qtcharts
- qml6-module-qtpositioning
- qml6-module-qtqml-models
- qml6-module-qtquick-controls
- qml6-module-qtquick-dialogs
- qml6-module-qtquick-layouts
- qml6-module-qtquick-templates
- qml6-module-qtquick-window
- qml6-module-qtquick
- qt6-base-dev
- qt6-declarative-dev
- libqt6quickcontrols2-6
- qml6-module-qtcore
- qml6-module-qtqml-workerscript
- qml6-module-qt5compat-graphicaleffects
- libqt6svg6
I've added a fix in the gz-sim branch https://github.com/gazebosim/gz-sim/pull/2305/commits/a2652ac19b906587f441c40f29c886ceda7dd0d3 which should help with the communication between the server and GUI ECMs. With that, I see glimmers of hope :) Screen recording 2024-07-16 14.18.43.webm
I was able to visualize the 3D screen even without your changes. It was hidden at the very left covered by other collapsed window plugins.