Reputation: 160
I have a QMenuBar in window, and background color is white, so when action is selected, or mouse is point at action, text color becomes white. How can i change hover effect color? I tried to change from pallete by changing selected text color, but that doesn't worked
Upvotes: 0
Views: 2608
Reputation: 2344
QMenuBar::setStyleSheet()
will do the trick.
You can fully customize the layout of your component. Be aware of using setStyleSheet means you'll completely override the style of the component with your stylesheet.
QString style = "QMenuBar::item:selected { background: white; } QMenuBar::item:pressed { background: white; }"
menuBar.setStyleSheet(style);
Upvotes: 3