Thanks for your answer. I update my code.

No compilation problem, but i have an error when i closing my program, here :
Qt Code:
  1. QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
To copy to clipboard, switch view to plain text mode