Well, you could use the sql statement
ATTACH DATABASE filename AS databasename
ATTACH DATABASE filename AS databasename
To copy to clipboard, switch view to plain text mode
then it is pure SQL and has nothing to do with Qt. => You can still use Qt's classes.
Or you can simply use
QSqlDatabase::addDatabase("path/to/file",
"mySecondDatabase");
//...
QSqlDatabase::addDatabase("path/to/file", "mySecondDatabase");
//...
QSqlQuery q(QSqlDatabase::database("mySecondDatabase"));
To copy to clipboard, switch view to plain text mode
Bookmarks