How can I check in QGIS python if an atrribute is included in my layer?

المشرف العام

Administrator
طاقم الإدارة
I use the following code:

for field in self.layer.pendingFields(): if field.name()=='elevation': do this else: do that Although there is an elevation attribute in my layer it does not recognize it does that instead of this. Any ideas why?



أكثر...
 
أعلى