Do not add a layout to a widget that has one already
Creating a layout with a parent adds the layout to the parent widget, in this case the dialog got the two layouts added that were meant for the inside widgets.