1

How can i activate and desactivate qgis features selection toolbar in the main window using a signal in a python plugin?

0

1 Answer 1

4

You can activate the "Select Single Feature" tool using iface.actionSelect().trigger().

If you want to be able to deactivate the tool, you need to activate the tool that was previously active. You can save the active tool using

currentTool = iface.mapCanvas().mapTool()

Then, when you want to deactivate the "Select Single Feature" tool, you can activate the previous tool using

currentTool.activate()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.