[Qgis-developer] QgsAttributeDialog() working example

Salvatore Larosa lrssvtml at gmail.com
Mon Sep 29 08:21:38 PDT 2014


Hi,

On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto <senhor.neto at gmail.com> wrote:
> Hello,
>
> I'm trying to open an attribute dialog for a temporary feature using
> QgsAttributeDialog(). but with no luck. Can anyone point me to working
> example?
> I'm trying something like this:
>
>>
>> mc = iface.mapCanvas()
>> layer = mc.currentLayer()
>> dialog = QgsAttributeDialog(layer, temp_feature)
>> dialog.show()

I think you should to import the class before and setting the feature
owner bool parameter.
after this changes the snippet should work fine for you!

Regards,
-SL

-- 
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt on freenode


More information about the Qgis-developer mailing list