2008/5/19 Gunnar Sletta <[EMAIL PROTECTED]>:
> Bráulio Barros de Oliveira wrote:
>
>> Hello,
>>
>> I'm developing my first QtJambi application. It needs a connection to
>> PostgreSQL, but, unfortunetely, my qt jambi installation doesn't detect
>> its
>> driver, even the included by default QSQLITE driver. For PostgreSQL plugin
>> support, I've copied the plugin library from my qt installation to the
>> $JAMBI/plugins/sqldrivers folder of the qt jambi binary bundle.
>>
>> On the application launch, the following output is shown:
>> QSqlDatabase: QPSQL driver not loaded
>> QSqlDatabase: available drivers:
>>
>> It seems that qtjambi is not looking for any plugin at all.
>> I'm using the eclipse integration.
>> Any help is appreciated.
>>
>
> Hi,
>
> For Qt Jambi to load plugins from $JAMBI/plugins, you need to either call
> QCoreApplication.addLibraryPath(PATH_TO_JAMBI_PLUGINS) or set the
> environment variable QT_PLUGIN_PATH to $JAMBI/plugins.
I had already tried setting QT_PLUGIN_PATH both on eclipse and on the shell
and unfortunetely it didn't work.
QApplication.addLibraryPath("/home/braulio/qtjambi-linux32-gpl-4.3.4_01");
QApplication.addLibraryPath("/home/braulio/qtjambi-linux32-gpl-4.3.4_01/plugins");
QApplication.addLibraryPath("/home/braulio/qtjambi-linux32-gpl-4.3.4_01/plugins/sqldrivers");
The abose function put just after QApplication.initialize(args) also didn't
worked
Also, I've restored the original sqldrivers directory, which contains the
libqsqlite.so driver only.
In both cases the list of available drivers is empty. (shouldn't it show at
leeast the sqlite driver?)
Another insteresting thing i've noticed is that the output of
System.out.println(QLibraryInfo.location(QLibraryInfo.LibraryLocation.PluginsPath));
is /home/qt/package-builder/qt-gpl/plugins. Shouldn't it be a relative path,
as this is a static package (qtjambi-linux32-gpl-4.3.4_01.tar.gz)?
[]'s,
bráulio
>
>
> There is also a good chance that the sql drivers that you picked from your
> Qt installation are binary incompatible with the version of Qt Jambi that
> you are using, in which case the plugins will either fail to load or crash
> your application. If you use C++ plugins with Qt Jambi we strongly suggest
> that you build both Qt and Qt Jambi from scratch to avoid binary
> incompatibility issues.
>
> Did you look at the JDBC bridge? It has been available on labs for some
> time and was integrated into Qt Jambi 4.4.
>
>
> http://doc.trolltech.com/qtjambi-4.4.0_01/doc/html/com/trolltech/qt/sql/QJdbc.html
>
> -
> best regards,
> Gunnar
>
>
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest