Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, June 2007
Using Qtjambi sql module with PostgreSQL


Message 1 in thread

Hello !

This is my first message here so before anything else, I just would like
to say "Great Job guys !" ;-) Qt Jambi is very interesting and very
promising.

I'm currently investigating its possibilities, especially in OpenGL and
SQL domains (in two separate projects).

But for moment my problem concerns SQL module. I'm encountering
difficulties understanding global approach of Qt Jambi about database
concerns and a more complete example than Cached Table would be helpful.
More specifically, an example demonstrating the best manner to add or
delete database records in the Jambi Model/View framework would certainly
help me (and maybe anyone else). If anybody have few time to wrote it, it
would be very appreciated (at least by me :-) ).

The most important problem I encountered is that I could not make Jambi
sql module working with my PostgreSQL database. I've downloaded last QT
and built the PostgreSQL driver, but as expected after reading that post :
http://lists.trolltech.com/qt-jambi-interest/2006-12/thread00048-0.html,
Jambi refuse to load this newly compiled driver.
Any news about this point ? Is there a way to make Jambi works with others
database than SQLite planned ?

Thanks for any help... (and sorry for the length of this message)

jMax






Message 2 in thread

moebius@xxxxxxxxxx wrote:
> Hello !
> 
> This is my first message here so before anything else, I just would like
> to say "Great Job guys !" ;-) Qt Jambi is very interesting and very
> promising.

Thanks ;-)

> I'm currently investigating its possibilities, especially in OpenGL and
> SQL domains (in two separate projects).
> 
> But for moment my problem concerns SQL module. I'm encountering
> difficulties understanding global approach of Qt Jambi about database
> concerns and a more complete example than Cached Table would be helpful.
> More specifically, an example demonstrating the best manner to add or
> delete database records in the Jambi Model/View framework would certainly
> help me (and maybe anyone else). If anybody have few time to wrote it, it
> would be very appreciated (at least by me :-) ).

We don't have Qt Jambi examples illustrating this right now but there 
are plenty of Qt / C++ examples that are available and that are well 
documented. The SQL overview is not linked in the online docs (made a 
task for fixing that) but you should get quite a bit from:

http://doc.trolltech.com/4.3/qtsql.html

> The most important problem I encountered is that I could not make Jambi
> sql module working with my PostgreSQL database. I've downloaded last QT
> and built the PostgreSQL driver, but as expected after reading that post :
> http://lists.trolltech.com/qt-jambi-interest/2006-12/thread00048-0.html,
> Jambi refuse to load this newly compiled driver.
> Any news about this point ? 

You probably don't have the same build key for your database plugins. Qt 
only loads plugins with the same configuration as the libraries its 
using. The configure line you need for Qt is:

Mac OS X: ./configure -no-qt3support -universal -release -no-rpath -fast 
-shared -no-framework -prefix $(pwd)

Windows: configure -no-qt3support -release -fast -shared -no-dsp -no-vcproj

Linux: ./configure -no-qt3support -fast -release -no-rpath -no-xfixes 
-no-xcursor -shared

> Is there a way to make Jambi works with others database than SQLite planned ?

If you compile the plugins with the above configuration it should 
already work.

best regards,
Gunnar