Search code examples
c++qtqt4qtableview

How to get right row height in Qt for QTableView object?


From this screenshot you can see a lot of space inside the rows:

alt text

I've used these functions to get resizing:

resizeRowsToContents();
resizeColumnsToContents();

How can I get a better fit for cells/rows sizes?


Solution

  • Try these:

    verticalHeader()->setDefaultSectionSize(int size)
    horizontalHeader()->setDefaultSectionSize(int size)