PDA

View Full Version : Usability of StyleSheet in Pure Custom Widget Plugin?



umituzun84
5th March 2010, 08:08
Hi All;

I have created my own pure custom widget which reimplement paintEvent and draw itself instead of using existing widgets. So this widget plugin pure custom. I have lots of Q_PROPERTY to play in Designer Property Window. My question is could I use my own defined properties in stylesheets to customize look&feel by css? I know there is to many QCssKnownValue but is there any way to introduce my own properties to css parser to understand and can handle form stylesheets.

I mean think that I have my own property like borderMainColor, so I will add borderMainColor:rgb(241, 83, 255) line to style sheet and it will automatically change this property in runtime?

Is this possible?
Thanks in advance.

wysota
5th March 2010, 11:55
You can't use CSS with custom widgets unless you are drawing them purely with the use of QStyle.

umituzun84
5th March 2010, 15:22
You can't use CSS with custom widgets unless you are drawing them purely with the use of QStyle.

Thanks again wysota.
Regards.