I am creating a plugin in QGIS where I want to read a Vector layer --> Select attribute column --> list unique values within the chosen attribute column in the selected attribute from the column.
I have been successful with the two first steps, but not with the third.
This is the code used so far, but I cannot get further than this.
self.layerComboManagerPoint = QgsMapLayerComboBox(self.dlg.comboBoxVector) self.layerComboManagerPoint.setCurrentIndex(-1) self.layerComboManagerPoint.setFilters(QgsMapLayerProxyModel.PolygonLayer) self.layerComboManagerPoint.setFixedWidth(175) self.layerComboManagerPointField = QgsFieldComboBox(self.dlg.comboBoxField) self.layerComboManagerPointField.setFilters(QgsFieldProxyModel.AllTypes) self.layerComboManagerPoint.layerChanged.connect(self.layerComboManagerPointField.setLayer)
I have tried googling, but I might just not have a reasonable word to google on.