Alright, I have an application in which I use style sheets. Now I have a problem. In my application, I use this:
* {
background-color: black;
}
* {
background-color: black;
}
To copy to clipboard, switch view to plain text mode
which sets the background color of all widgets black. Unfortunately though, the menu that appears by right-clicking on an object such as QLineEdit is also black. I do not want this behavior. I know that I can use:
background-color: somedifferentcolor;
}
QMenu {
background-color: somedifferentcolor;
}
To copy to clipboard, switch view to plain text mode
but that wouldn't be really platform/theme independent, as I want the default style for the menu to remain intact. In CCS3, there is the not() selector, which should be used like this:
background-color: black;
}
*:not(QMenu) {
background-color: black;
}
To copy to clipboard, switch view to plain text mode
but Qt doesn't support this. Is there any way in which I can restore the QMenu's default colors or just omit it in the unary selector using Qt Style Sheets?
Thanks!
Bookmarks