Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It is necessary to create an object with different names, they are set in the second parameter.
For example like this:
QSqlDatabase::addDatabase("QMYSQL", "ClassName1")
QSqlDatabase::addDatabase("QSQLITE", "ClassName2")
If you add two connections with the same name, the second one replaces the first one. QSqlDatabase::removeDatabase("ClassName1");
QSqlDatabase::removeDatabase("ClassName2");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question