vratojr
24th September 2010, 15:59
Hello everybody, it may be that I'm raising an old problem but I haven't found any solution or whatever.
I'm using a subclass of QStyle in my application and I'm trying to do minor customization with a stylesheet.
The problem is that when I apply a stylesheet (even an extremely reduced one as you will see) to my application, the old colors of the style get screwed.
In particular, I have defined a sublcass of QLabel named StyLabel to which I set a Q_PROPERTY named lType. Then, If I apply a style sheet like:
StyLabel[lType="value"] { color: red}
the colors of the other QLabel, that uses a color different from QPalette::text, get screwed. Is this the unavoidable consequence of applying stylesheets or what?
Thanks.
I'm using a subclass of QStyle in my application and I'm trying to do minor customization with a stylesheet.
The problem is that when I apply a stylesheet (even an extremely reduced one as you will see) to my application, the old colors of the style get screwed.
In particular, I have defined a sublcass of QLabel named StyLabel to which I set a Q_PROPERTY named lType. Then, If I apply a style sheet like:
StyLabel[lType="value"] { color: red}
the colors of the other QLabel, that uses a color different from QPalette::text, get screwed. Is this the unavoidable consequence of applying stylesheets or what?
Thanks.