[Qgis-developer] Python dynamic forms

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Thu Sep 16 03:51:44 EDT 2010


Bernhard Ströbl <StroeblB at jena.de> scritti il 16/09/2010 09.36.12

> > Because it's integrated into QT framework.

> this certainly is a plus.

> To all of you: Has anybody made any positive or negative experiences:
> Ease of coding, amount of code needed ...?
> Is there a recommendation by the devs? Should there be one?

I use it regulary in my plugin. For example, there's a very useful class:
QSqlQueryModel, you write a query and you can "push it" results in a
QTableView automatically (no need to define columns, iterate over records,
etc). See all QtSql classes here:

http://doc.trolltech.com/4.5/qtsql.html

(it's QT 4.5, the same version of the windows QGIS 1.5 distribution).

> > Again, in my QGIS 1.5 Windows install if I do this at Python Console:
> >
> >>>> import psycopg2
> > Traceback (most recent call last):
> > File "<input>", line 1, in <module>
> > File "U:/Applicazioni/qgis-1.5.0-2/apps/qgis/./python\qgis\utils.py",
line
> > 291, in _import
> > ImportError: No module named psycopg2

> it is in Libs in OSGEO-Installer and is not automatically ticked when
> you select QGIS

Yes, but if you want to distribute that plugin "worldwide", using the QT
library is a better option.



More information about the Qgis-developer mailing list