[Qgis-developer] QgsFields problem

francescoboccacci at libero.it francescoboccacci at libero.it
Fri Feb 1 15:22:54 PST 2013


Hi all,
i have a problem with new class QgsFields:

in my code i wrote:

fields = { 0 : QgsFields("ID", QVariant.Int),
                        1 : QgsFields("Area",  QVariant.Double),
                        2 : QgsFields("Perim", QVariant.Double),  
                        3 : QgsFields(field, QVariant.String) }

and i receive below error:

line 67, in processAlgorithm
    fields = { 0 : QgsFields("ID", QVariant.Int),
TypeError: arguments did not match any overloaded call:
  QgsFields(): too many arguments
  QgsFields(QgsFields): argument 1 has unexpected type 'str'

Anyone can help me please?

Thanks

Francesco


More information about the Qgis-developer mailing list