'Set the filtering function.'

def setFilterFunc(self, func):

    if (not (isinstance(func, Callable) or (func is None))):
        raise ValueError('A    callable    object    or    None    expected.')
    if (self.__filterFunc != func):
        self.__filterFunc = func
        self.dataChanged.emit(self.index(0, 0), self.index(self.rowCount(), 0))
