| 45 | } // namespace |
| 46 | |
| 47 | QPixmap colorToPixmap(const QColor& inColor) |
| 48 | { |
| 49 | QPixmap pm(16, 16); |
| 50 | QPainter p(&pm); |
| 51 | p.setPen(Qt::black); |
| 52 | p.setBrush(inColor); |
| 53 | p.drawRect(0, 0, pm.width(), pm.height()); |
| 54 | return pm; |
| 55 | } |
| 56 | |
| 57 | /* |
| 58 | Copy pm2 onto pm1, but preserve the alpha value from pm1 where pm2 is transparent. |
no test coverage detected