When using the qxorm plugins to control the qsqldatabase occured the errors.
-
here's the errored tips.i dont konw what i should do.
how to stop and close the database by using the default way of the qxorm or qsqldatabase?QSqlDatabasePrivate::removeDatabase: connection '{ffa49827-2e9f-4b24-9aca-ddba09dd0142}' is still in use, all queries will cease to work
-
@nicker-player
You either have a query still active when you attempt to close the database, or perhaps you have kept aQSqlDatabase
instance in existence and then are exiting your program. Check https://doc.qt.io/qt-6/qsqldatabase.html#detailsWarning: It is highly recommended that you do not keep a copy of the QSqlDatabase around as a member of a class, as this will prevent the instance from being correctly cleaned up on shutdown. If you need to access an existing QSqlDatabase, it should be accessed with database(). If you chose to have a QSqlDatabase member variable, this needs to be deleted before the QCoreApplication instance is deleted, otherwise it may lead to undefined behavior.