Skip to content

Qt6 compile fix#3493

Closed
mosfet80 wants to merge 2 commits intomoveit:mainfrom
mosfet80:QT5-6
Closed

Qt6 compile fix#3493
mosfet80 wants to merge 2 commits intomoveit:mainfrom
mosfet80:QT5-6

Conversation

@mosfet80
Copy link
Copy Markdown
Contributor

@mosfet80 mosfet80 commented Jun 4, 2025

Description

the patch allows compilation with both qt5 and qt6

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@rhaschke
Copy link
Copy Markdown
Contributor

rhaschke commented Jun 4, 2025

Is this a backport of moveit/moveit#3582? If so, why didn't you declare it like this?
If not, why not? The PR was already reviewed and we should not do work twice.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (848c062) to head (ccbab53).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3493       +/-   ##
==========================================
- Coverage   46.24%   0.00%   -46.23%     
==========================================
  Files         726      51      -675     
  Lines       59483    5938    -53545     
  Branches     7624    1057     -6567     
==========================================
- Hits        27504       0    -27504     
+ Misses      31813    5938    -25875     
+ Partials      166       0      -166     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@mosfet80
Copy link
Copy Markdown
Contributor Author

mosfet80 commented Jan 7, 2026

Is this a backport of moveit/moveit#3582? If so, why didn't you declare it like this? If not, why not? The PR was already reviewed and we should not do work twice.

In fact, if you compile with only Qt6, the build fails.
The patch fixes the problem of compiling Moveit with Qt 5 and 6 simultaneously. If I analyze the cmake file moveit_ros/visualization/motion_planning_rviz_plugin/CMakeLists.txt,
the Qt5 library is included even when using Qt6.
And, qt5_wrap_cpp is also used when using Qt6.

@mosfet80 mosfet80 changed the title Qt5 6 Qt6 compile fix Jan 7, 2026
Fixed a rviz_default_plugin compilation error when using qt6.
The error is silent if you have qt5 and qt6 installed

fix qt6 compile
fix ament_target_dependencies
@nbbrooks
Copy link
Copy Markdown
Contributor

@mosfet80 Do you remember if there were specific packages that fail with the moveit/moveit#3582 approach if you compile with only Qt6?

Would you mind isolating this fix to just the Qt6 changes and remove the ament_target_dependency changes for now? I am going to get #3706 merged in which will not cause that deprecation to fail the CI job.

@nbbrooks
Copy link
Copy Markdown
Contributor

nbbrooks commented Mar 23, 2026

Thank you for the intial effort here - I picked it up in #3707

@rhaschke I took a look at the implementation in moveit/moveit#3582 - on the cmake side of things our resolution needed to look different because rviz2 does not set rviz_QT_VERSION

@nbbrooks nbbrooks closed this Mar 23, 2026
@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants