As for the style sheet - since I've only done non-customized tray menus with QT it's hard for me to say what is wrong with the given example, i think you need to override the items in the menu bar as well, since this would only set the background for the menu, and since the item takes the whole width, I think you just can't see the background. Try setting styles for QMenu::item
and QMenu::item:selected
to see if that helps.
As for the approach - again, haven't done the exact thing, but i don't think that a generic QMenu
will fit this, since you don't have much control over how buttons are laid out and I don't see a way to get blank space like in the Dropbox example, I think you need your own widget implementation and add other widgets, lay them out etc. You could subclass QMenu
and try adding some custom widgets like buttons etc to see if that can help you give the changes you need.