Hi Matteo,
On 05/11/2016 02:41 PM, matteo wrote: > HI devs, > > sorry to write again.. but I'm fighting (again) with Qt and QGIS > widgets.. > > In the UI I have a simple spinbox and I'd like to add the chance for > the user to use the data defined properties to update the value in the > spinbox. > > Unfortunately I'm not able to update the QgsMapLayerComboBox widget to > the QgsDataDefinedButton one. > > With a QgsFieldComboBox I found the easy way signal - solot: > > layerChanged(QgsMapLayer*) -> setLayer(QgsMapLayer*) > > that updates the QgsFieldComboBox (same thing with > QgsFieldExpressionComboBox). > > But I did not find something similar in the QgsDataDefinedButton API. look at QgsDataDefinedButton::init That should set up the button for a layer. It is not a slot though, not sure if you can connect this directly, you might need to create an intermediate method. Best wishes, Denis
_______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
