Hi.

I want to know how to make sure that I wont can let some cell of my view empty.
For example I doubleclicked cell and started write. I rite something and than I press enter or tab or arrow. But when I write nothing, when I let the cell empty and press enter or tab or narrow or click somewhere I want to application set the empty cell as current and call edit().
It sounds pretty easy but I dont know which signal may i use. I tried to use dataChanged with top and bottom modelindexes but it doesnt work and I dont know why. Thisi im the code:
Qt Code:
  1. void DB::dataChanged(const QModelIndex &top, const QModelIndex &bottom)
  2. {
  3. if(!top.isValid())
  4. return;
  5. QString data;
  6. data = top.data().toString();
  7. if (data.isEmpty())
  8. {
  9. view->setCurrentIndex(top);
  10. view->edit(top);
  11. }
To copy to clipboard, switch view to plain text mode 

I tried some other signals from QTableView and QSqlTableModel but nothing works perfectly for me.

Can anyone help me?