Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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.

    code:
    @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