Question

I have a tree widget and there are three levels in the tree as follows

Example Tree
============================
LEVEL1
    LEVEL2
    LEVEL2
       LEVEL3
       LEVEL3
    LEVEL2
    LEVEL2
LEVEL1

I want to apply different styles for items, depending their levels so that I can style, LEVEL1, LEVEL2 & LEVEL3 differently. I can do this with a two level tree. Please help. I want to achieve this at CSS level (without touching the code)

I went through following documenation. I guess distinguishing between LEVEL1 & LEVEL2 is the hard part.

http://doc.qt.digia.com/main-snapshot/stylesheet-examples.html#customizing-qtreeview

Was it helpful?

Solution

This cannot be done at Qt Style-Sheet level

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top