Search code examples
qtstylesheetqtstylesheets

What is the 'not equal to' selector in Qt stylesheets?


The title said it all. Is there any style-sheet selector to select a widget that have properties not equal to a value? Something like following:

QPushButton["something"!="xxx"] { background: red; }

Solution

  • The answer is no, there's no such selector available, according to what is said here:

    Qt Style Sheets support all the selectors defined in CSS2.

    and what is documented in CSS2.