Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Adjust TreeWidget Row
QtWS25 Last Chance

Qt Adjust TreeWidget Row

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 761 Views
  • 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 Offline
    R Offline
    ruisebastiao
    wrote on last edited by
    #1

    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
    0
    • R Offline
      R Offline
      ruisebastiao
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved