[Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
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

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Matthias Kuhn
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

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
? 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

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Matthias Kuhn
-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

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Tom Chadwin
: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

Re: [Qgis-developer] Field visibility in Python

2014-06-23 Thread Matthias Kuhn
-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