The manual describes the correct way to remove database is :
{
QSqlDatabase db = QSqlDatabase::addDatabase (...);
QSqlQuery query (db);
query.exec (...);
}
QSqlDatabase::removeDatabase (...);
What happens if I close the database but not remove it explicitly?