[PyQt] Trouble getting started with QtSql

Bryan Beutler bryanbeutler at yahoo.com
Mon Nov 24 05:08:14 GMT 2008


Hello,

I am new to python and PyQt.  I installed the windows binary PyQt-Py2.5-gpl-4.4.3-1.  I have python 2.5 installed.  I have been working my way through the pyqt book with good success until now.  I want to continue learning from the book with the SQLite examples.   This is what I am getting:


PythonWin 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
>>> from PyQt4.QtSql import *
>>> QSqlDatabase.isDriverAvailable("QSQLITE")
False
>>> li = QSqlDatabase.drivers()
>>> li
<PyQt4.QtCore.QStringList object at 0x00D084B0>
>>> li.isEmpty()
True
>>> 


My folder C:\Python25\Lib\site-packages\PyQt4\src\plugins\sqldrivers\sqlite
contains these 3 files:  README, smain.cpp, sqlite.pro

Am I missing something simple or do I have no drivers at all installed?


      


More information about the PyQt mailing list