[QGIS-Developer] Geometry in Python Layer Action

2018-12-12 Thread Peter Devoy
Hi list I hope questions for 2.X are still OK as I am using 2.18... If I want to get the geometry of a selected feature on the current layer I can do: iface.mapCanvas().currentLayer().selectedFeatures()[0].geometry() In a Python layer action (defined in Layer Properties dialog), is there a simi

Re: [QGIS-Developer] Qt Model-View updates blocked when Python console not open

2017-10-11 Thread Peter Devoy
and relying on > > side-effects of the console open. > > > > It also outlines the risks involved in using this kind of approach. > > > > https://gis.stackexchange.com/a/257016 > > <https://gis.stackexchange.com/a/257016> > > > >

Re: [QGIS-Developer] Qt Model-View updates blocked when Python console not open

2017-10-05 Thread Peter Devoy
PENRYN TR10 9TA 3XE Ltd · Registered in England and Wales · 9356871 On 4 October 2017 at 20:53, Peter Devoy wrote: > Hi all > > In my plugin I have extended QAbstractListModel to create a list of > objects; each object in the list has a 'url' property containing the > URL

[QGIS-Developer] Qt Model-View updates blocked when Python console not open

2017-10-04 Thread Peter Devoy
Hi all In my plugin I have extended QAbstractListModel to create a list of objects; each object in the list has a 'url' property containing the URL of an API resource. When the user selects a feature in main QGIS interface, each object in the list makes a HTTP request to its URL and updates its p