[Qt-interest] Error QSQLITE driver not loaded, but the driver is there and it’s called after QApplication!

Daniel França daniel.franca at gmail.com
Tue Feb 7 12:51:54 CET 2012


First I've to say that it was working after some problems I got with Qt
versions and then I had to compile Qt4.8 from sources.

Now when I ran my application I get this error:
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:

but the sqlite driver is there:
/usr/local/Trolltech/Qt-4.8.0/plugins/sqldrivers/
libqsqlite.dylib libqsqlite_debug.dylib

Then I put this line of code:
QApplication::addLibraryPath( "/usr/local/Trolltech/Qt-4.8.0/plugins/" );

And it's working... but I want to know a better way to solve this problem,
and I don't think my solution will gonna work in others computers.

I'm running on a OSX 10.6
GCC 4.2
Qt 4.8 compiled with dbus disabled and as framework.

PS: The call to SQLITE is after QApplication constructor

Best Regards,
Daniel França
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20120207/2a17a225/attachment.html 


More information about the Qt-interest-old mailing list