Hello everyone, I wanted to know how i should add a OK and a Cancel button on QTableview. I am creating a QTableView and updating changes to the data base. I wanted do the changed only when i clicked OK or Cancel button. I am doing all the software using a IDE so i have not created any button or anything with code..

The below code opens up a window,when i click the EditData button.
Qt Code:
  1. model3 = new QSqlTableModel;
  2.  
  3. model3->setTable("tempBulkdb");
  4. model3->setEditStrategy(QSqlTableModel::OnFieldChange);
  5. model3->select();
  6.  
  7. QTableView *view = new QTableView;
  8. view->setModel(model3);
  9.  
  10. view->showMaximized();
  11. view->setAlternatingRowColors(true);
  12. view->resizeColumnsToContents();
To copy to clipboard, switch view to plain text mode 
i wanted to add a OK and a cancel button to this window. Pls help me out.
thank you