[Qgis-user] Toggle Attribute

L.W. eaglelw at gmx.de
Mon Nov 23 01:06:21 PST 2020


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.


PS: Do I have to implement a Plugin to have a dockable window for
showing infos non modal on per action selected features?


Am 23.11.2020 um 09:40 schrieb Richard Duivenvoorde:
> On 11/22/20 8:40 PM, Jésahel Benoist wrote:
>> The actions are a standard way of acting on graphical objects, so for me it would be the first thing to try. Did you ?
>>
>> Le dim. 22 nov. 2020 à 20:01, Bernd Vogelgesang <bernd.vogelgesang at gmx.de <mailto:bernd.vogelgesang at gmx.de>> a écrit :
>>
>>      if you would be so kind to explain the "just" part of your proposal?
> I think in the User lists it is always good to add a link to some documentation about a QGIS-term. In this case 'actions' kan be a normal word, but (advanced) users maybe (or not) know that it is also something you can use to 'do something in QGIS upon a click on a feature'.
>
> Some documentation here:
> https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#actions-menu
> (or do a search on 'actions' in the QGIS docs site).
> Tip: go to vector layer properties, 'Actions' tab, and hit 'Create Default Actions' button. You will get all kind of examples.
>
> About original post: I do not think we have an Action on hover (plz correct me if I'm wrong), but to run some (PyQGIS) python code is doable.
> With PyQGIS you can search for features in other layers, and maybe 'select' these on click in the other layer (or change attribute, though I'm not sure how to change it back then... )
>
> Acutally this sounds like nice functionality for layers which have relations... I'm not so experienced with relations in layers.
>
> If you worked out a way to do this, plz let us know :-)
>
> Regards,
>
> Richard
>


More information about the Qgis-user mailing list