I have assigned one method to combobox like this
def run(self):
"""Run method that performs all the real work"""
GetAllLayers(self)
#attach index changed event / passing parametrized method
self.dlg.cbLayerNamesAll.currentIndexChanged.connect(lambda arg=self: LayersValueChange(arg))
getting error here
def LayersValueChange(self):
print "abc"
#selectedLayerName = str(self.dlg.cbLayerNamesAll.currentText())
#selectedLayerName = self.dlg.cbLayerNamesAll.currentText()
layers = self.iface.legendInterface().layers()//here error
And Error is:
layers = self.iface.legendInterface().layers()
AttributeError: 'int' object has no attribute 'iface'
self is object but it getting it like int.
iface
as described here.