Hi,


I have a QTableWidget that is being resized by the user. I need it to have as many rows as fit on the screen, without creating scrollbars.


For that i would need to calculate the number of rows exposed on the screen. I was unable to find a method for taht, so i did the following calculation:


(height - header.height) / rowheight


But the result is ... well, it works but it doesnt look very clean. is there a better or more official way?