fixed alignment problems in the dialog

This commit is contained in:
Volker Fischer 2015-02-04 18:12:50 +00:00
parent f4820f6c0f
commit a26fc768bf

View file

@ -539,10 +539,7 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
setWindowIcon ( QIcon ( QString::fromUtf8 ( ":/png/main/res/mainicon.png" ) ) );
QVBoxLayout* pLayout = new QVBoxLayout ( this );
QHBoxLayout* pMainSubLayout = new QHBoxLayout;
QHBoxLayout* pButSubLayout = new QHBoxLayout;
QVBoxLayout* pMLeftSubLayout = new QVBoxLayout;
QVBoxLayout* pMRightSubLayout = new QVBoxLayout;
QLabel* plblAlias = new QLabel ( "Alias/Name", this );
pedtAlias = new QLineEdit ( this );
QLabel* plblInstrument = new QLabel ( "Instrument", this );
@ -555,27 +552,30 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
pcbxSkill = new QComboBox ( this );
QPushButton* butClose = new QPushButton ( "&Close", this );
pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblAlias );
pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblInstrument );
pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblCountry );
pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblCity );
pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblSkill );
pMLeftSubLayout->addStretch();
pMRightSubLayout->addWidget ( pedtAlias );
pMRightSubLayout->addWidget ( pcbxInstrument );
pMRightSubLayout->addWidget ( pcbxCountry );
pMRightSubLayout->addWidget ( pedtCity );
pMRightSubLayout->addWidget ( pcbxSkill );
pMainSubLayout->addLayout ( pMLeftSubLayout );
pMainSubLayout->addLayout ( pMRightSubLayout );
QGridLayout* pGridLayout = new QGridLayout;
plblAlias->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
pGridLayout->addWidget ( plblAlias, 0, 0 );
pGridLayout->addWidget ( pedtAlias, 0, 1 );
plblInstrument->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
pGridLayout->addWidget ( plblInstrument, 1, 0 );
pGridLayout->addWidget ( pcbxInstrument, 1, 1 );
plblCountry->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
pGridLayout->addWidget ( plblCountry, 2, 0 );
pGridLayout->addWidget ( pcbxCountry, 2, 1 );
plblCity->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
pGridLayout->addWidget ( plblCity, 3, 0 );
pGridLayout->addWidget ( pedtCity, 3, 1 );
plblSkill->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
pGridLayout->addWidget ( plblSkill, 4, 0 );
pGridLayout->addWidget ( pcbxSkill, 4, 1 );
pButSubLayout->addStretch();
pButSubLayout->addWidget ( butClose );
pLayout->addLayout ( pMainSubLayout );
pLayout->addLayout ( pGridLayout );
pLayout->addLayout ( pButSubLayout );
// we do not want to close button to be a default one (the mouse pointer