Showing mouse interaction toolbar in custom module

If you right click on the toolbar area, you get a menu to show/hide certain toolbars with the name of the toolbar provided. You can use the name of the toolbar (e.g. “Mouse Interaction”) and do a search in the Slicer repository to find where it is used.

image

When I remove toolbars for my custom application, I fully remove the toolbar that I don’t need rather than just hiding because you can just right click the toolbar area and show it again.

toolbar = slicer.util.mainWindow().findChild(qt.QToolBar, "ModuleSelectorToolBar")
slicer.util.mainWindow().removeToolBar(toolbar)