[Qgis-developer] how to set @click_x variable

Régis Haubourg regis.haubourg at gmail.com
Wed Oct 19 08:59:54 PDT 2016


Thanks Matthias!
I forward your tips to the author
Cheers
Régis

2016-10-19 17:09 GMT+02:00 Matthias Kuhn <matthias at opengis.ch>:

> 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
> >
> _______________________________________________
> 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




-- 
Régis Haubourg

Attention, changement d'adresse mail!
Mon adresse principale devient désormais regis.haubourg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161019/19b8c20e/attachment.html>


More information about the Qgis-developer mailing list