# HG changeset patch # User displacer # Date 1197324350 0 # Node ID 69d7ff3ab6f09e7844f4e62cafecd8bc5ab9dc28 # Parent e1cc516488f29bf55a593993f11a6d5b4601091f some layout tune diff -r e1cc516488f2 -r 69d7ff3ab6f0 QTfrontend/selectWeapon.cpp --- a/QTfrontend/selectWeapon.cpp Sun Dec 09 17:16:15 2007 +0000 +++ b/QTfrontend/selectWeapon.cpp Mon Dec 10 22:05:50 2007 +0000 @@ -36,12 +36,19 @@ { QHBoxLayout* hbLayout = new QHBoxLayout(this); - QLabel* lbl = new QLabel(); + QLabel* lbl = new QLabel(this); lbl->setPixmap(QPixmap::fromImage(getAmmoImage(num))); - + lbl->setMaximumWidth(30); + lbl->setGeometry(0, 0, 30, 30); hbLayout->addWidget(lbl); + WeaponItem* item=new WeaponItem(QImage(":/res/M2Round2.jpg"), this); hbLayout->addWidget(item); + + hbLayout->setStretchFactor(lbl, 1); + hbLayout->setStretchFactor(item, 99); + hbLayout->setAlignment(lbl, Qt::AlignLeft | Qt::AlignTop); + //hbLayout->setAlignment(item, Qt::AlignTop); } SelWeaponWidget::SelWeaponWidget(QWidget* parent) :