From 27b239fc84e9660ce17279aed7481e91f70b211f Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 21 Oct 2013 12:36:24 +0300 Subject: [PATCH] Align for field description of increment. --HG-- branch : develop --- dialogs/dialogincrements.cpp | 6 ++++-- dialogs/dialogincrements.ui | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index b12414859..0bceb8d27 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -148,7 +148,7 @@ void DialogIncrements::FillIncrementTable(){ ui->tableWidgetIncrement->setItem(currentRow, 4, item); item = new QTableWidgetItem(cell.getDescription()); - item->setTextAlignment(Qt::AlignHCenter); + item->setTextAlignment(Qt::AlignLeft); ui->tableWidgetIncrement->setItem(currentRow, 5, item); } if(ui->tableWidgetIncrement->rowCount()>0){ @@ -156,7 +156,6 @@ void DialogIncrements::FillIncrementTable(){ } ui->tableWidgetIncrement->resizeColumnsToContents(); ui->tableWidgetIncrement->resizeRowsToContents(); - ui->tableWidgetIncrement->verticalHeader()->setDefaultSectionSize(20); ui->tableWidgetIncrement->setCurrentCell( row, column ); } @@ -466,6 +465,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ VIncrementTableRow incr = data->GetIncrementTableRow(itemName->text()); incr.setDescription(item->text()); data->UpdateIncrementTableRow(itemName->text(), incr); + ui->tableWidgetIncrement->resizeColumnsToContents(); + ui->tableWidgetIncrement->resizeRowsToContents(); ui->tableWidgetIncrement->setCurrentCell( row, 0 ); emit haveLiteChange(); } @@ -491,6 +492,7 @@ void DialogIncrements::InitialIncrementTable(){ ui->tableWidgetIncrement->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("In size"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("In growth"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Description"))); + ui->tableWidgetIncrement->verticalHeader()->setDefaultSectionSize(20); } void DialogIncrements::InitialLinesTable(){ diff --git a/dialogs/dialogincrements.ui b/dialogs/dialogincrements.ui index 1917246a3..74203d5cc 100644 --- a/dialogs/dialogincrements.ui +++ b/dialogs/dialogincrements.ui @@ -27,7 +27,7 @@ QTabWidget::North - 0 + 1 @@ -149,9 +149,15 @@ false + + false + 45 + + false + Denotation