<div dir="ltr">Sadly, after further test I discover that the crashes remain, so I think it is a qgis bug and not a problem in my code.<div>The problem happens when I put my custom form into a subform widget (QgsRelationEditorWidget). If I add a new record in the subform and I move to another record using the left column QGIS crashes. It seems to be a more general problem because the crash appears also when I add some simple control that modify the object in the form.</div><div><br></div><div>I can open a ticket and add some test data.</div><div>If it is a minor bug and it could be resolved easily I really offer a pizza and a beer to resolve it.</div><div><br></div><div>All the best</div><div>Luca</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-01 23:53 GMT+02:00 Luca Lanteri <span dir="ltr"><<a href="mailto:mescal72@gmail.com" target="_blank">mescal72@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>now I'm already using the python logic but my code is terrible and I have a lot of crash problem.<br></div><div>Now that I using your example all is easier and seem to worsk fine.<br><br></div><div>I owe you one beer.<br>Many many tanks !<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Luca<br><br></div></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-10-01 22:23 GMT+02:00 Blumentrath, Stefan <span dir="ltr"><<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="NO-BOK">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Hi Luca,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Sounds like a case for Python logic!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">General principles are explained here:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><a href="http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/" target="_blank">http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Also nice, and probably exactly what you are looking for:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><a href="http://medspx.fr/blog/Qgis/cascade_forms/" target="_blank">http://medspx.fr/blog/Qgis/cascade_forms/</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Cheers<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US">Stefan<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> <a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Luca Lanteri<br>
<b>Sent:</b> 1. oktober 2015 22:07<br>
<b>To:</b> qgis-user <<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>><br>
<b>Subject:</b> [Qgis-user] QGIS - value relation widget<u></u><u></u></span></p><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi to all,<br>
<br>
I need to build a form when the value of a combo are filtered basing on the value of anoter combobox.
<br>
I have a first combo where I choose the region and a second with the municipalities.
<br>
I need that the second combo shows only the municipalities of the choosed region.<br>
I tried to use use the widget "relationship value" with the a filter like classe_munic = attribute($currentfeature, 'classe_munic') without any success.
<br>
<br>
Has anyone ever done something similar?<br>
Thank in advance <u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Luca<u></u><u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>