[Qgis-developer] how to set @click_x variable

Matthias Kuhn matthias at opengis.ch
Wed Oct 19 08:09:09 PDT 2016


Hi Régis,

@[somthing] variables are taken from the QgsExpressionContext which
contains several QgsExpressionScopes. So you can just add a new
QgsExpressionScope to the QgsExpressionContext which is used to evaluate
the expression.

Not sure how hotlink works but if it evaluates expressions by itself it
shouldn't be hard to adjust the context with additional variables.

Matthias

On 10/19/2016 01:33 PM, Régis Haubourg wrote:
> Hi, 
> Is it possible to set qgis variables such as @click_x or @click_y using
> python? 
> 
> I used hotlink plugin that is an alternate way of triggering layer
> actions.  All other ways will return thos variables with clikc location
> on the canvas, when hotlink doesn't. How could we fix that?
> 
> Thanks for your lights
> 
> Régis
> 
> -- 
> OSLANDIA
> 
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the Qgis-developer mailing list