Java – How to make controls autosizing in Qt designer

javaqtqt-jambiuser interface

I'm using Qt Jambi 4.4 for a project I'm working on (and designing the windows in the Qt Designer eclipse plugin). One of the windows I'd like to use is a preview window which is basically just a window with a QWebView on it. How can I make it so that the QWebView resizes as the window does? I've set the sizePolicy to expanding for both Horizontal and Vertical position. What else do I need to do?

(also bear in mind that I'm a newbie to both Java and eclipse and need to be talked to in stupid people terms on both of those subjects)

UPDATE

Just to illustrate the point, here are a couple of screenshots (I've made the window background bright just to illustrate my point):

alt text http://img13.imageshack.us/img13/2103/screenshot2oi7.jpg

alt text http://img152.imageshack.us/img152/6250/screenshot1mz9.jpg

Best Answer

I don't know Jambi, but with Qt Designer just give the background the focus and then apply a layout from the toolbar. Then the main widget will get resized by that layout manager -- if you don't add that layout manager you'll get the widget resizing but the contents staying at their old positions.