PDA

View Full Version : Subclassing default style



thru
29th December 2010, 17:40
I want to make minor changes to some of the default pixelMetrics in the active style, for example changing the PM_SmallIconSize.
I understand that the proper way would be subclassing the style but that would imply knoing previously the default style active on the particular platform the program runs.

What would be a clean/simple way to do that ?

thanks!

javimoya
29th December 2010, 18:12
solution here:
http://developer.qt.nokia.com/faq/answer/how_to_avoid_subclassing_all_available_styles_when _wanting_to_change_a_smal

Added after 7 minutes:

since qt 4.6 a better and easier solution:
QProxyStyle (http://doc.qt.nokia.com/4.7-snapshot/qproxystyle.html)