1  void MainWindow::clearAllRecords() {
2    int rowCount;
3    int status = QMessageBox::question( this,
4           tr("Delete all Records ?"),
5           tr("This operation will delete all saved records. "
6            "<p>Do you want to remove all saved records ? " ),
7            tr("Yes, Delete all records"), tr("No !"),
8            QString(), 1, 1);
9    if (status == 0) {
10        rowCount = model->rowCount();
11        model->removeRows(0, rowCount);
12   }
13  }