PDA

View Full Version : qt.conf is not loading plugins on linux and Mac



yuvaraj.addu
26th December 2011, 10:42
Hi All,

I have qt application which is based on qslite. My folder structure is

bin ----
plugins ---> sqldrviers

myapplication

qt.conf

[Paths]
Plugins=./plugins


lib

libQt* libraries

I resolved librariy linking via rpath.

Now my problem is sql deivers are not loaded. I am getting below error messages

QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins.


Even i tried with QCoreapplication::addlibrarypath and set library path. Same error i am getting


How do i solve this issue


Thanks

Addu R

Lesiok
26th December 2011, 14:05
I think that real problem is QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins.
How did You create an instance of QCoreApplication or QApplication ? Show us some code.

yuvaraj.addu
27th December 2011, 04:23
QApplication a(argc,argv);

MainWindow w;

w.show();

a.exc();

yuvaraj.addu
27th December 2011, 08:08
Hi,

I fixed these issue myself

dawi
20th January 2012, 17:31
How did you fix the problem? can you please share your solution?
I am also running into this same problem. I tried addLibraryPath and changing the order of things and still get the same error:
PySide.QtSql.QSqlError(-1, "Driver not loaded"...)
Thanks,
-Daniel

wysota
20th January 2012, 18:50
I am also running into this same problem.
That's not the same problem unless you also get a message "QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins".