Apologies for cross-post from qgis-user - I thought -developer only dealt with
QGIS core, rather than also with plugin development.
How do I determine in Python whether each field is hidden? I can't get
editType() to work (and know it is deprecated). Does anyone have an example of
this using
Hi Tom,
The following example should should print the type for all widgets.
editorWidgetV2ByName( fieldName ) will return Hidden for all hidden
fields, so for checking simply use string comparison.
editorWidgetV2Config can then be used to access further configuration
options for the editor
?
Tom
-Original Message-
From: Matthias Kuhn [mailto:matthias.k...@gmx.ch]
Sent: 23 June 2014 13:55
To: Tom Chadwin; qgis-developer@lists.osgeo.org
Subject: Re: [Qgis-developer] Field visibility in Python
Hi Tom,
The following example should should print the type for all widgets
-developer] Field visibility in Python
Hi Tom,
The following example should should print the type for all widgets.
editorWidgetV2ByName( fieldName ) will return Hidden for all hidden
fields, so for checking simply use string comparison.
editorWidgetV2Config can then be used to access further
:46
To: Tom Chadwin; qgis-developer@lists.osgeo.org
Subject: Re: [Qgis-developer] Field visibility in Python
Hi Tom,
That works starting from 2.3 (master) / 2.4 (release/stable)
For 2.2 you will have to work with
i.editType( fields.indexFromName(field) )
This will continue to work
-developer@lists.osgeo.org
Subject: Re: [Qgis-developer] Field visibility in Python
Hi Tom,
The following example should should print the type for all widgets.
editorWidgetV2ByName( fieldName ) will return Hidden for all hidden
fields, so for checking simply use string comparison