Important: Please read the Qt Code of Conduct -

RemoveRow() method of a QSqlTableModel object

  • The removeRow() method works well in the constructor, it remove the concerning row. Why it doesn't in a custom slot.

    @tableModel->removeRow(0, QModelIndex());@

  • Have you tried checking the return value (it's a boolean, I believe), and if false checking lastError() to see if it contains info about the failure?

Log in to reply