[PyQt] Interbase QtSql driver

David Boddie david at boddie.org.uk
Sun Oct 14 01:24:49 BST 2007


On Sun Oct 14 00:00:34 BST 2007, Horst Herb wrote:

> I am am new to PyQt. I am using Ubuntu Linux "gutsy",  with PyQt4 version
> 4.3 including the packaged python-qt4-sql.
> 
> According to the documentation, Interbase appears to be supported by Qt4's
> SQL module.
> However, QSqlDatabase.drivers() lists only 
> QPSQL7
> QPSQL
> QMYSQL3
> QMYSQL
> QSQLITE
> QSQLITE2

That seems to be correct. The python-qt4-sql package depends on qt4-sql,
and the information page at

  http://packages.ubuntu.com/gutsy/libs/libqt4-sql

says this:

  It includes support for PostgreSQL, MySQL, and SQLite databases. If you
  wish to to use the SQL module for development, you should install the
  libqt4-dev package.

> 1.) How can I activate / add the Interbase driver? I need it urgently for
> porting a legacy project

It looks like you'll have to build the Interbase SQL plugin yourself. This
page should give you some basic information about building the Interbase SQL
plugins for Qt:

  http://doc.trolltech.com/4.3/sql-driver.html#qibase-for-borland-interbase

You'll need to get the source for the version of Qt you are using. You
should be able to get this by typing the following at the command line:

  apt-get source libqt4-dev

You shouldn't need to do more than just compile a couple of files, and the
document tells you exactly what to do. Let us know how you get on.

> 2.) What is the difference between QPSQL7 and QPSQL (I  se mostly Postgres 
> 8.2, so which driver should I use?)

I believe QPSQL is the one you want.

David



More information about the PyQt mailing list