QStaticText is not derived from QObject or QWidget; it is just a container for formatted text that will be drawn by QPainter. So it doesn't support style sheets (which are applied to QWidget classes), but it does support formatted text such as Rich Text.
If you need to use style sheets, then I think you are stuck with QLabel. On the other hand, if you are manually drawing text using QPainter, then you can use QStaticText.
It would be really nice if there was a style sheet to Rich Text format converter, but I don't think there is any such thing, at least not in the documented part of Qt.
Bookmarks