[PyKDE] how can i obtain Qsqldatabase from Qsqlcursor?

Hans-Peter Jansen hpj at urpla.net
Wed Oct 22 21:18:00 BST 2003


On Wednesday 22 October 2003 17:27, César González wrote:
> Hi all,
>
> 	I am wondering how can i obtain the qsqldatabase used by a
> QDataTable instance (or QSqlCursor, QDataBrowser, etc).  I have a
> class with a QDataTable and i would like to extract the
> Qsqldatabase from the QDatatable to make special transaction and
> commit operations.
>
> Is it possible?

Isn't QSqlDatabase.database(), what you look for?

You may want to look into examples3/SQL/runsqlex.py:76f for an usage 
example.

> Thanks everybody ;)

Cheers,
Pete




More information about the PyQt mailing list