Customization only works for objects with objectName. objectName is automatically set by Qt for objects created in designer (compiled from .ui). For objects created programmatically it has to be set. Object names have to be added in all plugins.
Recommendation for plugin authors: when you are adding QMenu or QAction, always set its object name, e.g.: myMenu = QMenu('My menu") myMenu.setObjectName("myMenu")
From Radim comments.
Customization only works for objects with objectName. objectName is automatically set by Qt for objects created in designer (compiled from .ui). For objects created programmatically it has to be set. Object names have to be added in all plugins. Recommendation for plugin authors: when you are adding QMenu or QAction, always set its object name, e.g.: myMenu = QMenu('My menu") myMenu.setObjectName("myMenu")
See also http://hub.qgis.org/issues/9134
This should be added to Python manual/guidelines.
Original ticket https://hub.qgis.org/issues/10133