[PyKDE] QSqlDatabase.close() causes python core dump.

Hans-Peter Jansen hpj at urpla.net
Sat Mar 13 12:25:01 GMT 2004

On Saturday 13 March 2004 11:03, Phil Thompson wrote:
> On Saturday 13 March 2004 05:07, Mike Meyer wrote:
> > I've got a class that keeps a QSqlDatabase as a feature. At one
> > point, I want to close and reopen the database. Everytime I hit
> > the call to close, I get a core dump from python. Examing that
> > with gdb shows that it is indeed in QSqlDatabase::close. Adding
> > an isOpen test before the call to close causes it do dump core in
> > QSqlDatabase::isOpen.
> >
> > I worked around the problem by just not closing the database, but
> > I feel that this ought to be looked into.
> A small but complete example would help.

.. or look into examples3/SQL/runsqlex.py: MainWindow.dbConnect()
which does exactly that, when you connect to some database a 2nd time
(without crashing here, btw [sip 3.10.1, PyQt 3.11, Qt 3.2.1]).


More information about the PyQt mailing list