Set aligment for table.

--HG--
branch : feature
This commit is contained in:
dismine 2014-05-26 16:42:41 +03:00
parent 063bacc444
commit 19ab8f9299

View File

@ -208,6 +208,7 @@ void DialogIncrements::FillMeasurements()
flags = item->flags(); flags = item->flags();
flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag
item->setFlags(flags); item->setFlags(flags);
item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetMeasurements->setItem(currentRow, 5, item); ui->tableWidgetMeasurements->setItem(currentRow, 5, item);
} }
ui->tableWidgetMeasurements->verticalHeader()->setDefaultSectionSize(20); ui->tableWidgetMeasurements->verticalHeader()->setDefaultSectionSize(20);
@ -306,7 +307,7 @@ void DialogIncrements::FillLengthLines()
ui->tableWidgetLines->setRowCount ( linesTable->size() ); ui->tableWidgetLines->setRowCount ( linesTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key())); QTableWidgetItem *item = new QTableWidgetItem(QString(i.key()));
item->setTextAlignment(Qt::AlignHCenter); item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold)); item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetLines->setItem(currentRow, 0, item); ui->tableWidgetLines->setItem(currentRow, 0, item);
@ -341,7 +342,7 @@ void DialogIncrements::FillLengthSplines()
currentRow++; currentRow++;
ui->tableWidgetSplines->setRowCount ( splinesTable->size() ); ui->tableWidgetSplines->setRowCount ( splinesTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key())); QTableWidgetItem *item = new QTableWidgetItem(i.key());
item->setTextAlignment(Qt::AlignLeft); item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold)); item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetSplines->setItem(currentRow, 0, item); ui->tableWidgetSplines->setItem(currentRow, 0, item);
@ -377,8 +378,8 @@ void DialogIncrements::FillLengthArcs()
currentRow++; currentRow++;
ui->tableWidgetArcs->setRowCount ( arcsTable->size() ); ui->tableWidgetArcs->setRowCount ( arcsTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key())); QTableWidgetItem *item = new QTableWidgetItem(i.key());
item->setTextAlignment(Qt::AlignHCenter); item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold)); item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetArcs->setItem(currentRow, 0, item); ui->tableWidgetArcs->setItem(currentRow, 0, item);