This example may help
Qt Code:
QSqlQuery query; query.exec("SELECT MAX(id) FROM mytable"); if (query.next()) { myStringResult = query.value(0).toString(); } query.finish();To copy to clipboard, switch view to plain text mode
off course you need to replace the SQL code inside the .exec(_)
Bookmarks