'Reimplemented from :class:`QSortFilterProxyModel.flags`'

def flags(self, index):

    source = self.mapToSource(index)
    flags = source.flags()
    if (self.__filterFunc is not None):
        enabled = (flags & Qt.ItemIsEnabled)
        if (enabled and (not self.__filterFunc(source))):
            flags ^= Qt.ItemIsEnabled
    return flags
