[Qgis-developer] Combo boxes for raster bands

EFTAS Fabian Wilske Fabian.Wilske at eftas.com
Thu Oct 27 05:31:32 PDT 2016


Hello,

in my plugin I successfully connected a QgsFieldComboBox with a 
QgsMapLayerComboBox to let my user select a field of an already selected 
vector layer.

Now I want to give my user the opportunity to select a band of an 
already selected raster layer. How to achieve this?

I guess it should be possible with the QGIS Combo Manager module by 
Denis Rouzaud which supports band combo boxes 
(http://3nids.github.io/qgiscombomanager/). But its README tells me that 
the module is deprecated now because its functionality has been merged 
into QGIS core. Unfortunately, I couldn't find a QgsBandComboBox (or 
something like this) class in the QGIS core API and QgsFieldComboBox 
doesn't work for me with raster layers.

Any idea for combo boxes for raster layer bands using the core API?

Best regards,
Fabian


More information about the Qgis-developer mailing list