Where is the QGIS action for the “deselect” toolbutton in the 'Attributes" toolbar? I do not see this action in the QgisInterface class or do not recognize it by name. Is it missing from iface?
I'd like to use this action in a plugin directly instead of the button on the toolbar.
Answer
You can get the attributes toolbar and iterate through its actions (buttons) until you get the "deselect" one. Then you can trigger it.
Try this in your QGIS Python console:
for a in iface.attributesToolBar().actions():
if a.objectName() == 'mActionDeselectAll':
a.trigger()
break
No comments:
Post a Comment