# HG changeset patch # User displacer # Date 1196972732 0 # Node ID 38338573e09a064c0ec6fafcde7091f9003df274 # Parent fb03a39a10ff4947409b7731240a5ed5ddea4a81 mask applied diff -r fb03a39a10ff -r 38338573e09a QTfrontend/selectWeapon.cpp --- a/QTfrontend/selectWeapon.cpp Thu Dec 06 20:02:01 2007 +0000 +++ b/QTfrontend/selectWeapon.cpp Thu Dec 06 20:25:32 2007 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include QImage getAmmoImage(int num) { @@ -35,8 +36,10 @@ { QHBoxLayout* hbLayout = new QHBoxLayout(this); - QLabel* lbl = new QLabel("1"); - lbl->setPixmap(QPixmap::fromImage(getAmmoImage(num))); + QLabel* lbl = new QLabel(); + QPixmap px(QPixmap::fromImage(getAmmoImage(num))); + px.setMask(px.createMaskFromColor(QColor(0,0,0))); + lbl->setPixmap(px); hbLayout->addWidget(lbl); WeaponItem* item=new WeaponItem(QImage(":/res/M2Round2.jpg"), this);