IMHO you also must create PARENT layout and add to it your layouts.
Also why you create visual alements manually? It more easy create it by QDesigner and then you not be have alike this questions