QTreeView - How to increase the size of expand/collapse buttons and how to apply style upon that?



  • Hi,

    How to set the height and width of the expand and collapse buttons in the QTreeView?

    I have used setIndentation to set the width of the button. And in the stylesheet, I have used QTreeView::item to set height and width.

    It worked.

    But, now, when I have used QItemDelegate, to manage some of tree item data, the size is collapsed, the height is resized to the minimum. But, width remains same because of setIndentation I guess.

    Any thoughts?

    Thanks,
    Kumara



  • Alright! I have fixed this problem by myself.

    I have reimplemented sizeHint and I have set the size to the one I wanted.

    This solves the problem.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.