PDA

View Full Version : Driver not loaded (sqlite) at Ubuntu



Simplevolk
8th February 2013, 13:26
HI!
I try to create and connect to Database with Qt 5.0.0 and Ubuntu 12.04LTS;



db=new QSqlDatabase();
db->addDatabase("QSQLITE");
qDebug()<<this<<__FUNCTION__<<__LINE__<<db->lastError().text();


db says: Driver not loaded;

I copy libqsqlite.so at Qt/gcc/plugins/sqldrivers/libqslite.so to /myproject/sqldrivers/libqslite.so;
but no result;


And i do this:

a.addLibraryPath(a.applicationDirPath()+"sqldrivers/");

How to add driver into my Project?

Lykurg
8th February 2013, 14:50
addDatabase is static! You might want have a look at the given example in the detailed description of QSqlDatabase.