[Solved]QTableView resizeRowsToContents()

  • I have created a custom delegate that subclasses QStyledItemDelegate. I have a QTableView for which i am setting my custom delegate as


    Now the Items that are stored in the tableView varies in width and height. So i tried to use resizeRowsToContents() and resizeColumnsToContent(), but nothing changes. It does not update the tableView row and column width/height. Also if i override the sizeHint() function then also it does not work.

    Thanks for your time.

    This is how it looks "image":http://imageshack.us/photo/my-images/163/captureykl.png/

    This is what i want "image":http://imageshack.us/photo/my-images/823/capturejyr.png/

    Edit: Did some changes and it works fine !!!!!

Log in to reply

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