I'm assuming you're using traditional Qt (e.g. not QML or something).
I'm not entirely sure by what you mean by "applied stylesheet through paintEvent", but perhaps I can suggest that you use a more specific CSS selector when setting the style.
For example:
@
QPushButton,QLabel { background: green; }
@
.. will only style the QPushButton and QLabel objects
Or:
@
#myText { color: green; }
@
.. will only style the color of objects with a QObject::objectName() of "myText".
Or:
@
.QWidget { background: red; }
@
.. will only style objects of class QWidget but not sub-classes of QWidget
Check out http://doc.qt.nokia.com/latest/stylesheet-syntax.html#selector-types for more info.
Also, something I haven't seen documented, but is clearly in the code is that a property can be set to "native" (e.g. "border: native") to basically say that you want that property styled natively as if no stylesheet had been set.
Apologies if I'm not understanding the question.
[EDIT: code formatting, please wrap in @-tags, Volker]