[Interest] Qt Styles

André Somers andre at familiesomers.nl
Mon Jun 10 12:09:22 CEST 2013


In addition to Bo:

Op 10-6-2013 8:00, Bo Thorsen schreef:
> Den 10-06-2013 03:58, Andres L. skrev:
>> Hi,
>> I need a new style for an application I'm going to develop. I've looked
>> for it and I found three ways to make it:
>> 1) Subclass QStyle and reimplement virtual functions (the static way)
>> 2) Use QProxyStyle
>> 3) Use Qt Style Sheets
>> I've particularly interested with the first one, but I actually don't
>> know exactly when to choose one of them. Moreover, I have not found any
>> example (easy to understand, at least) of the (1) and (2) options.
> ...
>> Also, I need to know which of those 3 alternatives is the "lightest", I
>> mean, which consumes the minimum resources (less RAM?, less CPU?, etc.).
> If you are worried about this, forget all about style sheets. They are
> heavy and slow. But on the desktop they are usually fast enough.
> If you really have a complete style, it's a better idea to implement a
> QStyle.

Indeed. Now, if you just want to adjust a style, you'd use a proxy style 
instead of creating a completely new one. It saves you a lot of boring 
reimplementation of functions... It allows you to just override what you 
want to change, instead of starting from scratch. And it can work on top 
of any style (if you want).


You like Qt?
I am looking for collegues to join me at i-Optics!

More information about the Interest mailing list