There are name of toolbar you can see in :
Finding name of QGIS toolbar in Python?
But, I want to know the name of children of toolbar. For example, the children of mapNavToolBar are touch zoom and pan; pan map; pan map to selection; zoom in; zoom out; etc. Then if we know the name, how to disable in python?
For example to disable menuBar you can type the script :
iface.mainWindow().menuBar().setVisible(False)
But, for the child?
I want to show not all mapNavToolBar, Layers Panel, and menuBar.
Best Answer
First, we can find all object names of the icons in the
mapNavToolBar
using:Decide which ones you want to modify then add them to a list:
Now, you can either:
Hide them:
Or disable them: