Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

QSqlTableModel and delete rows



  • Hi
    I am attempting to use QSqlTableModel to delete rows from an Sqlite database. -
    @
    model->select();
    bool b = model->removeRows(0,200);
    model->submitAll();
    @
    The return value is false, so I thought I would get the last error using
    @
    QSqlError e = model->lastError();
    @
    However, this error has a type of NoError and all the error strings are empty

    Can someone tell me what I am doing wrong?

    Thanks


Log in to reply