I have a QTableView (sometimes 3 QTableViews) inside of a layout for a QWidget. The QTableView has no headers, and sometime has only a single, cell, making it quite small in that case. When the table has many cells, the widget shrinks and grows appropriately. When the table is small, the widget never gets smaller than approximately 100x70 pixels even though the cell itself is 36x16. I thought maybe this was some sort of minimum size issue with the widget or layout, but when I replace the QTableView with another widget like a QLabel, the widget is able to get smaller.

Debugging sizing/layout is a real pain as there are some many calls made to compute the layout. It appears that the QTableView is giving out a very poor sizeHint when it is small. Perhaps it's taking the missing headers into account when it should not? Has anyone experienced / solved this problem?