diff --git a/src/devices/deviceview.cpp b/src/devices/deviceview.cpp index 7035824b0..3fb343ef9 100644 --- a/src/devices/deviceview.cpp +++ b/src/devices/deviceview.cpp @@ -26,6 +26,7 @@ #include "ui/organisedialog.h" #include "ui/organiseerrordialog.h" +#include #include #include #include @@ -50,7 +51,10 @@ void DeviceItemDelegate::paint(QPainter* p, const QStyleOptionViewItem& opt, con } // Draw the background - QStyledItemDelegate::paint(p, opt, QModelIndex()); + const QStyleOptionViewItemV3* vopt = qstyleoption_cast(&opt); + const QWidget* widget = vopt->widget; + QStyle* style = widget->style() ? widget->style() : QApplication::style(); + style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, p, widget); p->save();