I'm not sure length() is what you are after. It depends on how your view is set up. Other parameters need to be gathered from different classes - the layout, the style and the widget. I suggest you try a simpler approach - by setting the size of the table widget and forcing the dialogs layout to adjust to it. You'll just need the frame size then.
Bookmarks