[Qgis-user] Toggle Attribute

Mike Flannigan mflan at mflan.com
Mon Nov 23 05:22:34 PST 2020


On 10/26/2014 I asked my first question in this forum:

Coordinate Capture plugin allows one to click on the map, hit
the "Copy to clipboard" button, and then use the lat/long on
the clipboard. I want something similar, but I want to
skip the "Copy to clipboard" button. Ideally I want to
click on the map and it copies the lat/long to the clipboard,
executes an external script, and puts the result on the map
next to the place clicked. I can skip the last step if that
is too complicated.

Can that be done with "Actions"? Or is the Python Console or
some other means a better way to get this done?



It went unanswered and I have never found a way to execute a
script upon a click.  I've seen others who wanted actions based
on a click or hover, but no clear solutions presented.  It sounds
like you are on to something below.


Mike


On 11/23/20 5:24 AM, qgis-user-request at lists.osgeo.org wrote:
> I tried a little bit with "actions" but - I think you're right - there
> is no onHover.
>
> anyway, I found a much more comfortable solution for the moment.
>
> I add the simple term "OR is_selected()" in the if clause for my symbol
> to show the changed color (in my case I draw a line between two points)
> and it worked like a charme.
>
> But, this is without the option to e.g. display a messagebox or someting
> like that with additional informations of the feature (I know about map
> hints/tips (I do not know the right translation).
>
> Yes you could made an action for that, but my goal was to show this on
> hover, but click is oooookay.
>
> For X-Mas my wish in relation to QGIS is a hover event ... on feature on
> map and on symbols.;-)
>
> Thanks for helping to everyone.
>




More information about the Qgis-user mailing list