'Set the filtering function. `func` should a function taking a single
:class:`QModelIndex` argument and returning True if the item at index
should be disabled and False otherwise. To disable filtering `func` can
be set to ``None``.'

def setFilterFunc(self, func):

    proxyModel = self.view().model()
    proxyModel.setFilterFunc(func)
