How do I set background image on popup menu item? Can someone give me an example?
How do I set background image on popup menu item? Can someone give me an example?
Qt 5.3 Opensource & Creator 3.1.2
I cannot say for sure about Qtopia 2.2.3, but you could try to play around with something like this. It all depends on the used style, of course. QPalette::Button color role could work with windows styles. Plastique style doesn't propably even use brushes at all when drawing a menu item so this doesn't work in case plastique style is in use. I suggest you to take a look at the style sources to find out how does it fill the background for a CE_MenuItem.
Qt Code:
menu.setPalette(p);To copy to clipboard, switch view to plain text mode
J-P Nurmi
Bookmarks