Fixed Qt duplicate layout problem