Remove qstyleoption_cast
This commit is contained in:
@@ -80,8 +80,7 @@ void DeviceItemDelegate::paint(QPainter *p, const QStyleOptionViewItem &opt, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw the background
|
// Draw the background
|
||||||
const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem*>(&opt);
|
const QWidget *widget = opt.widget;
|
||||||
const QWidget *widget = vopt->widget;
|
|
||||||
QStyle *style = widget->style() ? widget->style() : QApplication::style();
|
QStyle *style = widget->style() ? widget->style() : QApplication::style();
|
||||||
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, p, widget);
|
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, p, widget);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user