I would like to get the last ID of the table (plandfile)
I got the SQL code for it which gives me a nice single string under:

Qt Code:
  1. SELECT id FROM plandfile WHERE id=(SELECT MAX(id) FROM plandfile)
To copy to clipboard, switch view to plain text mode 

what would be the best way to transform this to a QString??
Is there a method of QSqlquery which return a String??
Please help
Thanks