#include "bonuspoint.h" namespace { QPixmap *pixmap = 0; } BonusPoint::BonusPoint(QGraphicsItem *parent) : PixmapItem(parent) { if (pixmap == 0) { pixmap = new QPixmap(":/cherry"); } setPixmap(*pixmap); }