<div dir="ltr">Hello Salvatore,<div><br></div><div>You were right, I just needed to import the class first, this have opened the form for me:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">from qgis.gui import QgsAttributeDialog<br>mc = iface.mapCanvas()<br>layer = mc.currentLayer()<br>temp_feature.setAttributes(attributes)<br>dialog = QgsAttributeDialog(layer, temp_feature, True)<br>dialog.show()</blockquote></div><div><br></div><div>But now I can't make it editable.</div><div><br></div><div>All I can do is cancel the dialog.</div><div><br></div><div>Thanks for your help,</div><div><br></div><div>Alexandre Neto</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa <span dir="ltr"><<a href="mailto:lrssvtml@gmail.com" target="_blank">lrssvtml@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto <<a href="mailto:senhor.neto@gmail.com">senhor.neto@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm trying to open an attribute dialog for a temporary feature using<br>
> QgsAttributeDialog(). but with no luck. Can anyone point me to working<br>
> example?<br>
> I'm trying something like this:<br>
><br>
>><br>
>> mc = iface.mapCanvas()<br>
>> layer = mc.currentLayer()<br>
>> dialog = QgsAttributeDialog(layer, temp_feature)<br>
>> dialog.show()<br>
<br>
</span>I think you should to import the class before and setting the feature<br>
owner bool parameter.<br>
after this changes the snippet should work fine for you!<br>
<br>
Regards,<br>
-SL<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Salvatore Larosa<br>
linkedIn: <a href="http://linkedin.com/in/larosasalvatore" target="_blank">http://linkedin.com/in/larosasalvatore</a><br>
twitter: @lrssvt<br>
skype: s.larosa<br>
IRC: lrssvt on freenode<br>
</font></span></blockquote></div><br></div>