Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Qt6 #657

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Migrate to Qt6 #657

wants to merge 7 commits into from

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Feb 26, 2025

🎉 New feature

Closes #586

Requires #656

Summary

Based on #596, but offers a simpler migration. Mainly, we keep using the plugin approach we were using before and set context properties to make the plugin's functionality available in QML modules. The plugin's name is prepended with an underscore (_) since properties that start with an uppercase letter are not allowed in Qt6. See https://doc.qt.io/qt-5/qtqml-syntax-objectattributes.html#defining-property-attributes

Property names must begin with a lower case letter and can only contain letters, numbers and underscores.

This PR also does not try to support both Qt5 and Qt6 as it's not clear right now if that will actually be possible. We can revisit this later if we need to.

Notes

  • Not all imports need to have their versions removed, but the following do:
    • QtQuick.Dialogs
    • Qt5Compat.GraphicalEffects
    • QtCore

TODO:

  • Fix commented out code
  • Fix TreeView implementation
  • Check that the changes to FileDialog loses functionality
  • NavSatMap: QtLocation is not available in Qt6 6.4 which is what's shipped in Ubuntu Noble. It is available in newer versions of Ubuntu https://packages.ubuntu.com/oracular/qml6-module-qtlocation.

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Addisu Z. Taddese <[email protected]>
Before this fix, if the value property has a binding instead of a value,
any modification from the GUI (e.g. hitting the up arrow on the spin
box) would not actually change the displayed value because it is
immediately reset back to the value set by the binding. This is the case
in the `GzPose` module and the effect can be easily be seen in the
`GridConfig` plugin. To test, run:

`gz gui -c examples/config/grid_config.config`

You will see that, before this change, modifying the x,y,z,roll,pitch,
yaw values actually changes the grid configuration, but the updated values are
not displayed in the spinbox.

Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey requested a review from jennuine as a code owner February 26, 2025 21:46
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label Feb 26, 2025
Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey linked an issue Feb 26, 2025 that may be closed by this pull request
14 tasks
@azeey azeey marked this pull request as draft February 26, 2025 22:10
@azeey azeey mentioned this pull request Feb 26, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪵 jetty Gazebo Jetty
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

Migrate Qt5 to Qt6
1 participant