def check_int(cell):
    """
    Colors the cell red if the integer is invalid

    Parameters
    ----------
    cell : QLineEdit()
        a PyQt/PySide object

    Returns
    -------
    value : int / None
        int : the value as a int
        None : is_passed=False
    is_passed : bool
        is this a valid integer
    """
    text = cell.text()
    try:
        value = int(text)
        cell.setStyleSheet('QLineEdit{background: white;}')
        return value, True
    except ValueError:
        cell.setStyleSheet('QLineEdit{background: red;}')
        return None, False
