PDA

View Full Version : style order



wirasto
23rd January 2010, 10:16
What the style order for use ? Like this ?

Example for QTreeView..

+-------------------------+
| StyleSheet |
+-------------------------+
| Delegate |
+-------------------------+
| Role from Model |
+-------------------------+
| QStyle |
+-------------------------+


So if I want make a custom background color for a QTreeView, and I use custom QStyle and Stylesheet. Then background color from stylesheet will be apply ? And background color from custom QStyle will be ignored ?

caduel
23rd January 2010, 10:40
when you use a custom style, the other things might apply - depending on what your style does.
If the style ignores the information passed, then no, the other things won't have an effect.

If you have the model under control that is probably the easiest way to control the background colour.