[PyKDE] Re: Python crash with qtsql.QSqlDatabase

Phil Thompson phil at riverbankcomputing.co.uk
Tue May 4 23:24:01 BST 2004


On Tuesday 04 May 2004 12:48 am, Tuvi, Selim wrote:
> Not sure if this is a Qt bug or a PyQt bug but I am getting a crash on the 
last line of the following session (db.open()):
> >>> from qt import *
> >>> from qtsql import *
> >>> a = QApplication()
> >>> import sys
> >>> a = QApplication(sys.argv)
> >>> db = QSqlDatabase.addDatabase('QMYSQL3')
> >>> db.isOpen()
>
> False
>
> >>> db.open()
>
> Granted, I am trying to open the database without specifying the host, the
> name or the user id but I was expecting an exception.
>
> Running on Windows XP, SIP 4 (snapshot-20040411), PyQt 3.11 commercial, Qt
> 3.3.1 academic.

It works as expected on Linux - which would suggest it's not a PyQt problem. 
Can you tell where it's crashing?

Phil




More information about the PyQt mailing list