Hello,
I'm using Qt to work with a sqlite database but I have an error. If I try to declare the handler for the QSqlDatabase object as a pointer I get the error: Driver not loaded. So if I use
QSqlDatabase db;
db = QSqlDatabase::addDatabase("QSQLITE");
To copy to clipboard, switch view to plain text mode
everything is ok but if I'm trying to use a pointer
db ->addDatabase("QSQLITE");
QSqlDatabase *db;
db = new QSqlDatabase;
db ->addDatabase("QSQLITE");
To copy to clipboard, switch view to plain text mode
I get the error that the Driver is not loaded. Anyone has any idea why the second case doesn't work?
Bookmarks