Im not sure what "material ripple animation" really is so its hard to say which design i would prefer.
Copying Paint of QMenu would be last choice as there might be bugs and its involving to keep in sync.
If the items can do all the drawing them self i would go for that. (2 i think :)
@SGaist According to comments in the bug report the posted code should work in qt 5.6.1, and I have been able to verify this is indeed the case. So I guess I should consider this question as 'answered' then. Thanx for the help
If not, then you should also make the menu the parent of your QAction rather than your IModelElement.
Out of curiosity, why the two casts one after the other ? You should also rather use qobject_cast since your IModelElement is also a QObject.
On a side note, did you take into account the memory consumption of your model ? You are creating as many menus and actions (and also QObjects) as you have elements in your model for a functionality that doesn't really demand it.
@m_jero I don't know why nobody answers this question. Maybe because you didn't supply any code snippets as recommended. Anyway, I suppose you used the exec() function to show the qmenu. Try to use popup() instead and see if it works.