[SOLVED] Database warning
-
Hi
I write a small database project for my homework (Database Design). Everything is good, else than a warning: when exiting program always this warning is shown in terminal:
@
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
@ -
That would depend on how you designed your application. If you have your QQuery objects on the stack, make sure they run out of scope before your database does. If you have them on the heap, you can delete them before your database is destroyed. An even simpler approach would be to simply ignore the warning. It won't hurt you.
-
Thank you
I ran out of scope of methods that was at least one query used in them and also deleted pointers to queries. now there is no warning :-)
bq. An even simpler approach would be to simply ignore the warning. It won’t hurt you.
I know, this is a homework => should look clear ;-)