diff --git a/src/device/deviceview.cpp b/src/device/deviceview.cpp index 3f3bb8597..895f9aaa1 100644 --- a/src/device/deviceview.cpp +++ b/src/device/deviceview.cpp @@ -80,8 +80,7 @@ void DeviceItemDelegate::paint(QPainter *p, const QStyleOptionViewItem &opt, con } // Draw the background - const QStyleOptionViewItem *vopt = qstyleoption_cast(&opt); - const QWidget *widget = vopt->widget; + const QWidget *widget = opt.widget; QStyle *style = widget->style() ? widget->style() : QApplication::style(); style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, p, widget);