PDA

View Full Version : Tableview complete sizehint



skuda
5th March 2009, 10:33
Hello, i have a dialog with a tableview that populate data from a dynamic sql query, so the size can vary greatly depending on the size of the returned data.

Any times the default size for the dialog it is too large, with a too big last column because of setStrechtLastSection(True) and many blank rows and other times i have scrollbars for the width and the height.

I have tried any methods of the QHeaderView of the table and the QTableView itself to determine what it is the size the tableview has after the populated data and resize the dialog but i can get the correct value, how could i do it?