I try to edit numerical value in cells in TableWidget with keyboard and mouse scroll. I want to keep focus on selected cell unless confirmation of value with or mouse selection of another cell.

Qt Code:
  1. ParamTableWidget::ParamTableWidget(QWidget *parent) :
  2. TableWidget(parent)
  3. {
  4. connect(this, SIGNAL(cellChanged(int,int)),this, SLOT(slotCellChanged(int, int)));
  5. }
  6.  
  7. void ParamTableWidget::slotCellChanged(int row, int column)
  8. {
  9. selectionModel()->select(model()->index(row,1), QItemSelectionModel::Select);
  10. edit(model()->index(row,1));
  11. }
To copy to clipboard, switch view to plain text mode 

I can't discard a modified cell value and i can't escape from cell edit without .

Any idea where the bug is?