| 75 | } |
| 76 | |
| 77 | void drawSelectionRect(QPainter *painter, const QStyleOptionViewItem &option, |
| 78 | const QRect &rect) |
| 79 | { |
| 80 | if ((option.state & QStyle::State_Selected)) |
| 81 | painter->fillRect(rect, option.palette.brush(QPalette::Highlight)); |
| 82 | else |
| 83 | { |
| 84 | QColor backgroundColor = option.palette.color(QPalette::Window); |
| 85 | backgroundColor.setAlpha(160); |
| 86 | painter->fillRect(rect, QBrush(backgroundColor)); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void drawFocusRect(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) |
| 91 | { |