Thank you for replying. Line 51 modified :P

I tried calling the reset but nothing changes. Rows showed change to 256 after the edit.

There is no selection, the user only changes the value of one cell so i think i dont have to iterate, right? So i call setData() from the index of interest but still the same, rows trim to 256.

Qt Code:
  1. void WidgetModificacion::actualizar_fecha (int row, QSqlRecord & record){
  2. if (tipo_tabla == 0){
  3. QSqlQuery query = QSqlQuery (db);
  4. query.prepare("UPDATE TABLE_PRODUCTOS SET fecha_modificacion = SYSDATE WHERE id_codigo_barra = :value");
  5. query.bindValue (":value", this->ui->tableView->model ()->data (this->ui->tableView->model ()->index (row, 0)).toString ());
  6. query.exec ();
  7. }
  8. //ui->tableView->reset();
  9. model->setData(model->index(row,5), QDateTime::currentDateTime().toString(),Qt::DisplayRole);
  10. while (model->canFetchMore())model->fetchMore();
  11. }
To copy to clipboard, switch view to plain text mode 

The value is always updated after edit and i can see that value modified but rows set to 256 anyways.