Thanks for your reply again, I have already posted that code it's a soft delete meaning it UPDATES and hides the record instead of complete delete.
Qt Code:
  1. query.prepare("UPDATE employee SET is_hidden = '1' WHERE emp_id = (:emp_id)");
  2. query.bindValue(":emp_id", emp_id);
  3. success = query.exec();
  4. if(!success)
  5. {
  6. qDebug() << "removeEmployee error: "
  7. << query.lastError();
  8. }
  9. else
  10. {
  11. if( tableRow >= 0 )
  12. emit employeeDeleted(tableRow);
  13. this->close();
  14. }
To copy to clipboard, switch view to plain text mode