My problem is very similar to this question.
I have a QTreeView which is connected to a model. Is it possible to style each level of the tree in different way? I need to change background color of each line. Different level would have a different background. Expanded items would have a different color as well.
I have already tried this http://doc.qt.io/qt-4.8/stylesheet-examples.html#customizing-qtreeview It seems that it is not possible to do so using only css. Could QProxyStyle help? How would it be used?
Thank you, Martin.