[PyQt] QtSql connection fail where psycopg2 success?
panupatc at gmail.com
Wed Jan 11 11:55:43 GMT 2012
You're right I used windows binary installer. I don't seem to have the
postgresql.dll anywhere, nor can I find the Qt installation folder : /
Following your suggestion, lastError indead tells me drivers are not
loaded. But what makes me really confuse is that none of the drivers are
loading at all.
all returns False.
I tried download and install the latest binary package but still same
Any suggestion what I should try next?
On Wed, Jan 11, 2012 at 6:18 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 11.01.12 18:03:52, Panupat Chongstitwattana wrote:
> > Where is Qt's plugin folder? I can only find this
> Whereever you installed Qt. If you took the PyQt4 windows binary
> package, then I don't know :|
> > C:\Python26\Lib\site-packages\PyQt4\plugins\sqldrivers
> > It has 4 files in it.
> > qsqlite4.dll
> > qsqlmysql4.dll
> > qsqlodbc4.dll
> > qsqlpsql4.dll
> That looks good, now you just need to ensure that the postgresql dll is
> also in your PATH when starting python so the qsqlpsql4.dll can find it.
> If thats also the case and its still not working, I'd suggest to check
> wether Qt really supports the driver via
> QSqlDataBase.isDriverAvailable(). You may also have some luck with
> checking isValid() after the addDatabase and maybe the lastError()
> function to get a proper message out.
> PyQt mailing list PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt