PDA

View Full Version : Weird problem resizing rows and columns in qtableview



Tiansen
24th December 2010, 10:40
I have a problem when trying to resize rows and columns properly. Let me tell you whole story in short: at first I used resizeRowsToContents() and resizeColumnsToContents() and that worked properly. But I had severe performance hit running these functions. With testing I found out that resizeRowsToContents() is much slower than resizeColumnsToContents() (I usually have much more rows than columns), so I decided to keep resizeColumnsToContents() and remove resizeRowsToContents(). As an alternative I used:


m_TableView->verticalHeader()->setDefaultSectionSize(150);

OK, now I have fixed height of rows. BUT... it has same strange side-effect that I dont understand. If I use that then suddenly my resizeColumnsToContents() does not work properly anymore, i.e. it does not resize columns properly. Can you please help me to find out what I'm doing wrong here?

Tiansen
27th December 2010, 15:26
Bump bump...