RE: layout problem
Select the main widget by clicking on it's background. Right-click on the main widget and choose Lay out->Lay out Horizontally, vertically, grid, as you wish. After that in property editor on bottom you will find Layout property an you can adjust your margins.