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

Qt Code:
  1. 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

Qt Code:
  1. db = new QSqlDatabase;
  2. 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?