Important: Please read the Qt Code of Conduct -

QSqlTableModel Auto Increment Field with insertRecord, insertRows,...

  • I want to know how to deal with the autoIncrement Field in a QSqlTableModel when creating a new record (a new row)
    in manual submit mode. When using insertRecord or insertRows method the automatic value is not incremented. after the submitAll procedure in the OBDC Table (a zero value is written instead)
    Thank you for your answer

  • Hi,
    can you please post create table statement along with the piece of a code where you insert the data to the table?

Log in to reply