MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / paint

Method paint

src/widgets.cpp:511–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511void 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
526QSize ComboBoxDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
527{

Callers

nothing calls this directly

Calls 1

isSeparatorFunction · 0.85

Tested by

no test coverage detected