A Python module, saved into a project.qgs file, can be loaded and have specific functions run on the following project events:
openProject()
saveProject()
closeProject()
Whether the macros are run can be configured in the application options.
Image Preview
Click the image to open original size image in new tab