according to @Joseph's answer, if you want to populate your combobox with fields of vector layers, since raster layers does not have any fields of attribute you may get the error: QgsRasterLayerAttributeError: have'QgsRasterLayer' object has no attribute Fields'fields'
.
so for avoiding that you must equal your Layers with Only vector layers, like this:
layers = [layer for layer in iface.legendInterface().layers() if layer.type() == QgsMapLayer.VectorLayer]
instead of:
layers = iface.legendInterface().layers()
good luck...