As with any other Qt widget, absolute widget geometry may be set using methods like QWidget::setGeometry(), QWidget::setFixedWidth(), and QWidget::setFixedHeight(). In addition, you may specify the width and height of the table widget indirectly, by setting the properties "visibleRows" and "visibleColumns".
When setVisibleRows() is called, the table computes the height of the specified number of rows, starting with the current value of the "topRow" property. This value becomes the preferred height of the main grid in the table widget.
Similarly, calling setVisibleColumns() causes the table to compute the width of the specified number of columns, starting with the current value of the "leftColumn" property. This value becomes the preferred width of the main grid in the table widget.
It is important to remember that the number of visible rows and columns does not include any frozen rows and columns. For instance, the following code will result in 12 visible rows -- the two frozen rows plus the ten "regular" rows.