Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

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

    General and Desktop
    1
    2
    753
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kumararajas last edited by

      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

      --Kumar

      1 Reply Last reply Reply Quote 0
      • K
        kumararajas last edited by

        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.

        --Kumar

        1 Reply Last reply Reply Quote 0
        • First post
          Last post