Stretch last section in icrement table.

--HG--
branch : develop
This commit is contained in:
dismine 2014-08-04 20:00:25 +03:00
parent c11e5d39dc
commit 6667671e40

View File

@ -363,8 +363,8 @@ void DialogIncrements::FullUpdateFromFile()
disconnect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::IncrementChanged); disconnect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::IncrementChanged);
ui->tableWidgetIncrement->clearContents(); ui->tableWidgetIncrement->clearContents();
ui->tableWidgetIncrement->horizontalHeader()->setStretchLastSection(true);
FillIncrements(); FillIncrements();
ui->tableWidgetIncrement->horizontalHeader()->setStretchLastSection(true);
connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::IncrementChanged); connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::IncrementChanged);
ui->tableWidgetLines->clearContents(); ui->tableWidgetLines->clearContents();
@ -575,7 +575,7 @@ void DialogIncrements::clickedToolButtonAdd()
ui->tableWidgetIncrement->setItem(currentRow, 4, item); ui->tableWidgetIncrement->setItem(currentRow, 4, item);
item = new QTableWidgetItem(description); item = new QTableWidgetItem(description);
item->setTextAlignment(Qt::AlignHCenter); item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetIncrement->setItem(currentRow, 5, item); ui->tableWidgetIncrement->setItem(currentRow, 5, item);
ui->toolButtonRemove->setEnabled(true); ui->toolButtonRemove->setEnabled(true);
@ -705,6 +705,7 @@ void DialogIncrements::IncrementChanged ( qint32 row, qint32 column )
ui->tableWidgetIncrement->resizeRowsToContents(); ui->tableWidgetIncrement->resizeRowsToContents();
this->column = 0; this->column = 0;
ui->tableWidgetIncrement->setCurrentCell( row, this->column ); ui->tableWidgetIncrement->setCurrentCell( row, this->column );
ui->tableWidgetIncrement->horizontalHeader()->setStretchLastSection(true);
break; break;
} }
default: default: