I would like to know how I can disable the 'save project' option in the QGIS print layout and report manager layout menus. I would also like to disable the save button on both gui's in PyQGIS 3.

Save Project from print layout Save project from the report manager Save project button on gui

For example: The following code snippets can disable elements of the project menu of the QGIS interface, I need to do the same for the print layout and report manager sub-gui's:



New print layout and layout manager disabled

1 Answer 1


You can use the following code to disable the Save Project button, just specify the name of the layout or report:

layouts = QgsProject.instance().layoutManager().layoutByName('reportOrLayoutName')
designer = iface.openLayoutDesigner(layouts)
layoutToolbar = designer.layoutToolbar()
for x in layoutToolbar.actions():
    if x.objectName() == 'mActionSaveProject':

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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