Current location - Recipe Complete Network - Complete cookbook of home-style dishes - The menu bar of Mainwindow in Qt turns white, and the black background behind the menu bar in ui editing interface turns white. What's the matter?
The menu bar of Mainwindow in Qt turns white, and the black background behind the menu bar in ui editing interface turns white. What's the matter?
Add CSS.

This-> SetStyelSheet(" "

"QMenuBar{" // Change the menu bar background to white.

"Background color: white;"

"}"

"q menu::item {"// Change the menu on the menu bar to black and blue.

"Background color: blue;"

"Color: black;"

"}");