[Solved] Main menu does not respond to the style sheet
-
Hello, good afternoon,
[English made Bing, sorry]
I have an application with a style sheet that works well except in the main menu.
When I run the application, the main menu looks like in the following picture:
!http://sddsoft.com.ar/imagenes/menu.png(MainMenu)!
Draws a gradient style Windows, apparently unresponsive to the style sheet. The menu css is as follows:
@
QMenuBar
{
background-color: rgb(248, 248, 248);
}QMenu
{
border-top: 1px solid rgb(0, 0, 0);
background-color: rgb(240, 240, 240);
}QMenu:selected
{
color: rgb(0, 0, 0);
background-color: rgb(224, 224, 224);
}QAction
{
background-color: rgb(240, 240, 240);
}
@What I am doing wrong?
Thanks a lot.
Dario.
P.D.: In some cases I noticed that CSS should add a space at the end of the Declaration of the widget so that Qt does not ignore it, but that is another topic.
-
Hi!
If you take a look at the docs "here":http://doc.qt.digia.com/qt/stylesheet-examples.html#customizing-qmenubar
You'll notice that there are two colons(:) for some items , and its QMenu::item:selected, QMenuBar::item:selected etc...
-
Thank you very much, sorry for the mistake