I am trying to put some spinboxes,line edits in a layout. But the size extends more than the neccesity. Below is the figure
Take a look at QSizePolicy. It may be usefull.