c++ - QTreeView - Hide controls for expanding and collapsing specific items -


i using c++/qt develop application. have custom model (derived qabstractitemmodel) shown qtreeview.

when item of model has children, qtreeview shows expanding/collapsing icon (a triangle) allows show/hide children. want hide icon on specific item. item has children has expanded always. want achieve following style tree (i use symbols + , - expanding/collapsing icon)

a  b  c  d <-i don't want show expanding/collapsing icon in item.   -e     e1     e2   +f   -g     -g1       g1.1       g1.2     g2 

i have been able hide expanding/collapsing icon of first item (the a), following command:

myqtreeview.setrootisdecorated(false); 

i have seen this answer shows how hide contro items. however, in case 1 specific item.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -