QTreeView: : branch: from - children:! From the - siblings: closed, QTreeView: : branch: closed: from - children: from siblings { -Border - image: none; Image: url (:/images/branch_closed PNG); }
QTreeView: : branch: open: from - children:! From the siblings, QTreeView: : branch: open: from - children: from siblings { -Border - image: none; Image: url (:/images/branch_open PNG); }
CodePudding user response:
You said the style sheet? It is ok to copy the past
CodePudding user response:
What I want is blue vertical bar on the left
CodePudding user response:
QSS write very clear:
QTreeView: : branch: from - children:! From the - siblings: closed, QTreeView: : branch: closed: from - children: from siblings { -Border - image: none; Image: url (:/images/branch_closed PNG); }
QTreeView: : branch: open: from - children:! From the siblings, QTreeView: : branch: open: from - children: from siblings { -Border - image: none; Image: url (:/images/branch_open PNG); }
But there is no need to use pictures, you can directly use border: QTreeView: : branch: from - children:! From the - siblings: closed, QTreeView: : branch: closed: from - children: from siblings { -Border - image: none; Border - left: none; }
//the son unfold and selected option when they show that vertical bar on the left side of the blue, can according to your requirements adjustment condition QTreeView: : branch: open: from - children:! From the - siblings: selected, QTreeView: : branch: open: from - children: from - siblings: selected { Border - image: none; Border - left: 5 px solid blue; }