connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(SetConclusion(QModelIndex, QModelIndex)));
void MainWindow::SetConclusion(QModelIndex leftIndex,QModelIndex rightIndex) { int Row = leftIndex.row(); int Column = leftIndex.column(); if(Column == 1 || Column == 2 || Column == 0) { QString ConclusionString = QString("%1 %2").arg(model->data(model->index(Row,1)).toString()).arg(model->data(model->index(Row,2)).toString()); model->setData(model->index(Row, 53), ConclusionString); model->setData(model->index(Row,54), model->data(model->index(Row,2)).toString().toLower()); } if(Column == 3 || Column == 6 || Column == 7 || Column == 8 || Column == 51 || Column == 52 || Column == 0 ) { model->setData(model->index(Row,55), model->data(model->index(Row,3)).toString().toLower()); model->setData(model->index(Row,56), model->data(model->index(Row,6)).toString().toLower()); model->setData(model->index(Row,57), model->data(model->index(Row,7)).toString().toLower()); model->setData(model->index(Row,58), model->data(model->index(Row,8)).toString().toLower()); model->setData(model->index(Row,59), model->data(model->index(Row,51)).toString().toLower()); model->setData(model->index(Row,60), model->data(model->index(Row,52)).toString().toLower()); }}
Column == 0
void mySlot(int row, QSqlRecord & record){ record.setValue(...); record.setValue(...);}