[PyQt] Re: Is it possible to subclass QSqlDatabase?

Wolfgang Rohdewald wolfgang at rohdewald.de
Fri Feb 6 08:25:15 GMT 2009

On Freitag, 6. Februar 2009, Mattia Borsalino wrote:
> class MyDatabase(QSqlDatabase):
>     """
>     subclasses QSqlDatabase
>     """
>     def __init__(self, parent=None):
>         super(MyDatabase, self).__init__(parent)

according to the docu, parent should either not be passed or it
should be another QSqlDatabase. 

this works:

     def __init__(self, parent=None):
         super(MyDatabase, self).__init__()


More information about the PyQt mailing list