The patch fixes progress bar color which now is always QPalette::Highlight. This leads to invisible bar contents for selected view items when we use QStyleOptionProgressBar inside item delegates. New version fixes this issue with setting QPalette::Window color if current state has QStyle::State_Selected flag.
Old version:
New version:
with QPalette::Window
with QPalette::HighlightedText
with QPalette::Window
with QPalette::HighlightedText
Delegate code should set correct state:
void MyDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { // ... QStyleOptionProgressBar progressBarOption; progressBarOption.state = option.state; // ... }