I'm using a QTableView inside a QWebView (using the createPlugin interface and a object tag with type 'application/x-qt-plugin' and a custom classid). The html consists of a title, some action links (using the linkClicked slot) and the table.

I'm trying to get the QTableView to fill exactly its surrounding <div>, but its always grows too large causing scrollbars to appear on the QWebView.

I'm using "height:100%" to get the <div> to have the right size. If I set its background to red, I can see that it occupies exactly the correct amount of space.

However if I put "height:100%" in the object tag uses to create the QTableView, it grows beyond the size of the QWebView widget, even if there are no rows in the table.

Does anyone have any ideas?