You QSqlQuery should be related to open database connection, right?