Well I have found a solution, its not very elegant but it works okay...

I count the number of rows added to the table, and when I get to a certain number of rows added, I start increasing the minimum length of the window with each additional row that is added (using setMinimumSize(600, minLengthOfWindow);

I use a similar method for decreasing the height of the window when rows are removed.

basically I do the following whenever a row is added to the table:

Qt Code:
  1. if ((numberOfRows > 7) && (numberOfRows < 18))
  2. {
  3. minLengthOfWindow = minLengthOfWindow + 30;
  4. Loader::setMinimumSize(600,minLengthOfWindow);
  5. }
To copy to clipboard, switch view to plain text mode