def is_layout_row_empty(layout, row):
    """Check if the given row in a grid layout is empty"""
    if layout:
        if row<layout.rowCount():
            return False
        for c in range(layout.columnCount()):
            if layout.itemAtPosition(row,c):
                return False
        return True
    return False