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.

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