<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I have a QGIS form with a number of widgets that are set to "disabled". I don't want the user to change these values manually, but they should be updated by a Python action "on demand". Hence I set the editable state of these widgets to False.</p>
<p>Now I noticed that while I can change values in the widgets with my Python action, the values are not stored when the editable state is set to "False". As soon as I set the editable state to "True", then my Python action works fine and the values are correctly stored.</p>
<p>I tried with two approaches:</p>
<p>QgsAttributeForm.changeAttribute()</p>
<p>and</p>
<p>QgsWidget.setValue()</p>
<p>Both of these work fine when editable state is enabled, but not, when they are disabled.</p>
<p>Is there any way to also change attribute values when the editable state of a widget is set to False?</p>
<p>Thanks,</p>
<p>Andreas</p>

</body></html>