Using lastInsertId() functionality with QSqlTableModel
-
Hello,
I have a MYSQL database that I am interfacing to using the QSqlTableModel class. This is working out great except for one thing: I dont seem to have the functionality that the simpler QSqlQuery class has and that is the lastInsertId() function.
The lastInsertId function is really useful since I can get back my ID for a row I just inserted to the database.
Does anyone know of a way to get the last inserted ID using the QSqlTableModel?
Thanks,
Liz