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