Details
-
Bug
-
Resolution: Fixed
-
P0: Blocker
-
6.7.0
-
None
-
-
8f283aa29 (dev), 3eb0c8007 (6.7.1), 35afe09b0 (6.7)
Description
Regression from 6.6.2. Here's the code:
#include <QApplication> #include <QMainWindow> #include <QStyledItemDelegate> #include <QListWidget> class Delegate : public QStyledItemDelegate { public: using QStyledItemDelegate::QStyledItemDelegate; void paint(QPainter * p, const QStyleOptionViewItem & option, const QModelIndex & index) const override { QStyleOptionProgressBar optProgress; optProgress.rect = option.rect; optProgress.minimum = 0; optProgress.maximum = 100; optProgress.progress = 50; optProgress.textVisible = false; if (auto* style = option.widget->style(); style != nullptr) style->drawControl(QStyle::CE_ProgressBar, &optProgress, p, option.widget); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); QMainWindow w; auto* view = new QListWidget{&w}; view->setItemDelegate(new Delegate{view}); w.setCentralWidget(view); view->addItem("abc"); w.show(); return a.exec(); }
Result in 6.6.2: progress bar displayed.
Result in 6.7.0: crash (access violation somewhere inside Qt).
Attachments
For Gerrit Dashboard: QTBUG-124447 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
558171,3 | Fix progress bar rendering issue when using windows 11 style | dev | qt/qtbase | Status: MERGED | +2 | 0 |
558260,2 | Fix progress bar rendering issue when using windows 11 style | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
558392,5 | Fix progress bar rendering issue when using windows 11 style | 6.7.1 | qt/qtbase | Status: MERGED | +2 | 0 |