Use void QTableView::resizeRowToContents( int row ) instead (by the way: setRowHeight() is inherited by QTableWidget ).

Yesterday I had the same problem. I didn't know what height to give setRowHeight() so I simply tried resizeRowToContents(). I hoped to get a minimized row height and a width that would show all the text in my table.
The latter didn't happen, but the row height was minimized *juhu*.