it's possible to create qmenus that don't have a parent, tough if a qmenu is created without a parent and a qaction belonging to another qmenu has setMenu calledon this one, visually one menu should be transientparent of the other, but this doesn't happen unless specified explicitly. in wayland the menu will be mispositioned as wl_shell requires menus to have a transientparent.
the assignemnt of transientparent (tough not parent()) should be done automatically for hyerarchies like that.
many existing applications are affected by this
attached a minimal example app that shows the problem