Qt Forum

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

    Qt Adjust TreeWidget Row

    General and Desktop
    1
    2
    639
    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.
    • R
      ruisebastiao last edited by

      i have a QTreeWidget with the following structure

      @ Row 1 --> QPushButton
      |
      |--> Child 1 --> QFrame
      |
      |->QVBoxLayout
      |
      |->QListView@

      The number of rows and thus the size of QListView can change, so i implemented a QStyledItemDelegate to set the sizehint according to size of QListView. My problem is that when i insert a row in QListView the QTreeWidget does not update the size of the row with the new sizehint value, if i use updateGeometry() the sizehint in the delegate is not called, but if i collapse and axpand the item then the row gets resized. how can i force the QTreeWidget to resize the row according to the sizehint without having to collapse and expand the root item, Thanks

      1 Reply Last reply Reply Quote 0
      • R
        ruisebastiao last edited by

        Ok, i have to call QTreeView::doItemsLayout()

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