[Qt-interest] How can I assign a QSS pseudo-state to my own object?

Paul Colby qt at colby.id.au
Fri Oct 23 03:13:50 CEST 2009


I like the QSS pseudo-state concept... it works very well for many Qt classes.

Is it possible to assign pseudo-states to my own custom widgets?
Specifically, have some logic that tracks which of a set of custom
widgets is "selected", and would like to be able to set the
":selected" pseudo state for that widget.

So then I could use QSS like:

MyWidget {
  ...
}

MyWidget:selected {
  ...
}

Is this possible with Qt 4.5/4.6?

Thanks :)

paul.
-- 
http://colby.id.au



More information about the Qt-interest-old mailing list