equal
deleted
inserted
replaced
35 QWidget(parent) |
35 QWidget(parent) |
36 { |
36 { |
37 QHBoxLayout* hbLayout = new QHBoxLayout(this); |
37 QHBoxLayout* hbLayout = new QHBoxLayout(this); |
38 |
38 |
39 QLabel* lbl = new QLabel(); |
39 QLabel* lbl = new QLabel(); |
40 QPixmap px(QPixmap::fromImage(getAmmoImage(num))); |
40 lbl->setPixmap(QPixmap::fromImage(getAmmoImage(num))); |
41 px.setMask(px.createMaskFromColor(QColor(0,0,0))); |
|
42 lbl->setPixmap(px); |
|
43 |
41 |
44 hbLayout->addWidget(lbl); |
42 hbLayout->addWidget(lbl); |
45 WeaponItem* item=new WeaponItem(QImage(":/res/M2Round2.jpg"), this); |
43 WeaponItem* item=new WeaponItem(QImage(":/res/M2Round2.jpg"), this); |
46 hbLayout->addWidget(item); |
44 hbLayout->addWidget(item); |
47 } |
45 } |