Hello, I am trying to setup a value relation edittype by pyqgis. I can use setWidgetType but then, none of the following seem to work:
vlayer.valueRelation(index).mLayer = target_layer.id() vlayer.valueRelation(index).mKey = key_field vlayer.valueRelation(index).mValue = value_field vlayer.valueRelation(index).mAllowNull = True vlayer.valueRelation(index).mOrderByValue I also asked this question at GIS stackexchange ( http://gis.stackexchange.com/questions/204175/how-to-set-and-configure-a-value-relation-edittype-in-qgis-2-14) but no responses so far. Does anyone know how to configure the value relation from python? Thanks, Josef
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer