This fixes the warning "Attempting to add QLayout "" to LayoutEdit "", which already has a layout" when the main window is created.