QSqlDatabasePrivate::addDatabase: duplicate connection name qt_sql_default_connection , old connection removed.
时间: 2024-05-21 12:11:22 浏览: 337
Qt连接数据库
This warning message indicates that you are attempting to create a new database connection with a name that already exists. In this case, the name is "qt_sql_default_connection".
To resolve this issue, you should first check if you already have an existing database connection with the same name. If you do, you can either re-use that connection or delete it before creating a new one.
If you need to create multiple database connections, you should use unique names for each connection to avoid this warning message.
阅读全文