[Qgis-user] Python form logic on attribute table open

Matthias Kuhn matthias at opengis.ch
Tue May 3 01:45:23 PDT 2016


Hi Tom,

Are you using global variables? They often lead to troubles in this context.

Matthias

On 05/03/2016 10:42 AM, Thomas Colley wrote:
>
> Hi
>
>  
>
> I have a Python init function bound to an attribute form. This is
> working great using the identify tool to open a feature form but is
> throwing an error when I open the layer’s attribute table.
>
>  
>
> Is there any way I can check in the Python whether a feature form has
> been opened or the attribute table. I have no need for the logic when
> opening the attribute table.
>
>  
>
> I’ve found QgsAttributeEditorContext that looks like it might do the
> trick but I can’t work out how to access it.
>
>  
>
> Any advice would be appreciated.
>
>  
>
> Thanks
>
>
> Tom
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160503/326157c3/attachment.html>


More information about the Qgis-user mailing list