<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
You try get a QgsRelationReferenceWidget (in qgis.gui) (not sure
though if specifying this explicitly makes any difference in python
though, it should determine the real type anyway).<br>
<br>
The methods you are looking for are then<br>
<br>
setForeignKey()<br>
<a class="moz-txt-link-freetext" href="http://qgis.org/api/classQgsRelationReferenceWidget.html#a2e9fb74545d2bb4b697a88ca4e434600">http://qgis.org/api/classQgsRelationReferenceWidget.html#a2e9fb74545d2bb4b697a88ca4e434600</a><br>
<br>
and<br>
<br>
foreignKey()<br>
<a class="moz-txt-link-freetext" href="http://qgis.org/api/classQgsRelationReferenceWidget.html#af1765af438f3dd4e642334a338a03ca4">http://qgis.org/api/classQgsRelationReferenceWidget.html#af1765af438f3dd4e642334a338a03ca4</a><br>
<br>
Best,<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 04/07/2015 10:47 AM, Enrico Fiore
wrote:<br>
</div>
<blockquote
cite="mid:1855453688.61851428396446961.JavaMail.defaultUser@defaultHost"
type="cite">Hi,<br>
I am trying to acces to the value stored in a field defined as
Relation Reference widget, I tried this code:<br>
<br>
<span> </span>dialog.findChild(QWidget,"fk_via_cod")<br>
<br>
so I access to the object but not to the value.<br>
<br>
I need to do something like this<br>
<span> </span>nameFieldDir =
dialog.findChild(QLineEdit,"cod_direzione")<br>
<br>
How I can perform this?<br>
<br>
Regards<br>
<br>
Enrico Fiore<br>
<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
</body>
</html>