Skip to main content
deleted 23 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

You need use PyQgis for this:

Toc

toc = iface.mainWindow().findChild(QDockWidget,'Layers').children()[4]
toolBar = toc.children()[1].setVisible(False)

Layers context menu

ltv = iface.layerTreeView()
ltv.setMenuProvider( None )

For attribute dialog I'll give you 2 examples:

Attribute = iface.mainWindow().findChild(QDockWidget,'AttributeTable').children()[4]

Remove Editing Button

Attribute.findChildren(QAction ,'mActionToggleEditing')[0].setVisible(False) 

Remove Multi Editing Button

Attribute.findChildren(QAction ,'mActionToggleMultiEdit')[0].setVisible(False)

For acces to objectname use this and remove the other buttons

values = Attribute.findChildren(QAction)
for v in values:
    print (v.objectName())

If you want it to be hidden in many machines, you can make a plugin, without an icon, botton etc. and only in your __init__ execute this code or through the startup.py

I hope it helps you

You need use PyQgis for this:

Toc

toc = iface.mainWindow().findChild(QDockWidget,'Layers').children()[4]
toolBar = toc.children()[1].setVisible(False)

Layers context menu

ltv = iface.layerTreeView()
ltv.setMenuProvider( None )

For attribute dialog I'll give you 2 examples:

Attribute = iface.mainWindow().findChild(QDockWidget,'AttributeTable').children()[4]

Remove Editing Button

Attribute.findChildren(QAction ,'mActionToggleEditing')[0].setVisible(False) 

Remove Multi Editing Button

Attribute.findChildren(QAction ,'mActionToggleMultiEdit')[0].setVisible(False)

For acces to objectname use this and remove the other buttons

values = Attribute.findChildren(QAction)
for v in values:
    print (v.objectName())

If you want it to be hidden in many machines, you can make a plugin, without an icon, botton etc. and only in your __init__ execute this code or through the startup.py

I hope it helps you

You need use PyQgis for this:

Toc

toc = iface.mainWindow().findChild(QDockWidget,'Layers').children()[4]
toolBar = toc.children()[1].setVisible(False)

Layers context menu

ltv = iface.layerTreeView()
ltv.setMenuProvider( None )

For attribute dialog I'll give you 2 examples:

Attribute = iface.mainWindow().findChild(QDockWidget,'AttributeTable').children()[4]

Remove Editing Button

Attribute.findChildren(QAction ,'mActionToggleEditing')[0].setVisible(False) 

Remove Multi Editing Button

Attribute.findChildren(QAction ,'mActionToggleMultiEdit')[0].setVisible(False)

For acces to objectname use this and remove the other buttons

values = Attribute.findChildren(QAction)
for v in values:
    print (v.objectName())

If you want it to be hidden in many machines, you can make a plugin, without an icon, botton etc. and only in your __init__ execute this code or through the startup.py

Source Link
Fran Raga
  • 7.9k
  • 3
  • 26
  • 48

You need use PyQgis for this:

Toc

toc = iface.mainWindow().findChild(QDockWidget,'Layers').children()[4]
toolBar = toc.children()[1].setVisible(False)

Layers context menu

ltv = iface.layerTreeView()
ltv.setMenuProvider( None )

For attribute dialog I'll give you 2 examples:

Attribute = iface.mainWindow().findChild(QDockWidget,'AttributeTable').children()[4]

Remove Editing Button

Attribute.findChildren(QAction ,'mActionToggleEditing')[0].setVisible(False) 

Remove Multi Editing Button

Attribute.findChildren(QAction ,'mActionToggleMultiEdit')[0].setVisible(False)

For acces to objectname use this and remove the other buttons

values = Attribute.findChildren(QAction)
for v in values:
    print (v.objectName())

If you want it to be hidden in many machines, you can make a plugin, without an icon, botton etc. and only in your __init__ execute this code or through the startup.py

I hope it helps you