Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Dynamically resize qtreewidget item



  • I wont change dynamically height of QTreeWidgetItem. I call:
    @item->setSizeHint(w, h)@
    item resize is ok!, but tree doesn't resize his content. I try:
    @
    tree->update(); //dont work
    tree->repaint(); //dont work
    @

    How i can do this?



  • Are you using a custom delegate? You can subclass QStyledItemDelegate and override the paint() function and sizeHint() function.


Log in to reply