Skip to content

Conversation

@idesign0
Copy link
Contributor

Summary

This PR fixes an issue where joint value progress bars in the Motion Planning → Joints tab of the RViz Motion Planning plugin are invisible on macOS, even though:

  • joint values update correctly,
  • the delegate paint() method is called,
  • valid joint bounds and values are present.

The issue occurs when using QStyle::CE_ProgressBar inside a QStyledItemDelegate, which is known to fail on macOS due to Qt style limitations.


Problem Description

The progress bars are rendered using a custom QStyledItemDelegate that draws a QStyleOptionProgressBar.
On macOS, style->drawControl(QStyle::CE_ProgressBar, ...) does not visually render the progress bar when used inside an item delegate, even if the delegate is active and enabled.

This results in empty cells with no visible progress indicator.

This is not purely an RViz issue, but a known Qt/macOS rendering limitation affecting progress bars drawn from delegates.

Screenshot 2025-12-15 at 10 17 42

Solution

A manual progress bar rendering fallback is introduced for macOS using QPainter:

  • Track background
  • Filled progress chunk
  • Border
  • Text overlay
Screenshot 2025-12-15 at 00 26 03

For non-macOS platforms, the existing Qt style-based rendering is preserved.


Known Qt Issues on macOS

This behavior is consistent with multiple reported Qt issues:


Platform Verification

  • Verified on macOS
  • Other platforms are unchanged and continue to use Qt’s native progress bar rendering

Notes

As an alternative approach, the manual drawing path could also be used unconditionally across platforms to avoid platform-specific Qt delegate rendering issues.

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (848c062) to head (0205c4d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3645       +/-   ##
==========================================
- 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.

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.

2 participants