| 107 | namespace { |
| 108 | |
| 109 | QVariant makeCheckBoxDecorator(QStyle* style, const QSize& size) |
| 110 | { |
| 111 | QCheckBox header_check; |
| 112 | header_check.setChecked(true); |
| 113 | header_check.setEnabled(false); |
| 114 | QPixmap pixmap(size); |
| 115 | pixmap.fill(Qt::transparent); |
| 116 | QPainter painter(&pixmap); |
| 117 | QStyleOptionViewItem option_item; |
| 118 | option_item.rect = { {0, 0}, size }; |
| 119 | style->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option_item, &painter, nullptr); |
| 120 | painter.end(); |
| 121 | return pixmap; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Returns a new QToolButton with a unified appearance. |
no test coverage detected