| 509 | } |
| 510 | |
| 511 | void ComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 512 | { |
| 513 | if (isSeparator(index)) |
| 514 | { |
| 515 | QStyleOptionViewItem opt = option; |
| 516 | if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView*>(option.widget)) |
| 517 | opt.rect.setWidth(view->viewport()->width()); |
| 518 | combo->style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, painter, combo); |
| 519 | } |
| 520 | else |
| 521 | { |
| 522 | QStyledItemDelegate::paint(painter, option, index); |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | QSize ComboBoxDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 527 | { |
nothing calls this directly
no test coverage detected