[Qgis-developer] please help me write a QGIS-PostGIS GUI in Python

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Feb 1 16:45:13 EST 2008


Maciej Sieczka wrote:
> Barry Rowlingson pisze:
>> Maciej Sieczka wrote:

> Sorry I'm slow. I thought, that since this code is already there in 
> src/app/qgsdbsourceselect.cpp, I just have to call it from Python.

  No - what you are writing now is a complete new class. You can't call 
the method from the C code directly.


> void QgsDbSourceSelect::addNewConnection()
> {
>   QgsNewConnection *nc = new QgsNewConnection(this);
> 
>   if (nc->exec())
>   {
>     populateConnectionList();
>   }
> }
> 
> into Python? Thus the whole src/app/qgsnewconnection.cpp too?

  Well, as much as you need for your dialog to have the functionality 
you need. You might want to simplify things if possible...

Barry




More information about the Qgis-developer mailing list