def initModels(self): self.model = QtGui.QStandardItemModel() self.filterModel = QtCore.QSortFilterProxyModel() self.filterModel.setSortCaseSensitivity(QtCore.Qt.CaseInsensitive) self.filterModel.setSourceModel(self.model) self.ui.uiTBL_textures.setModel(self.filterModel) self.filterModel.setFilterKeyColumn(1) self.model.setColumnCount(len(com.TABLE_COLUMN_NAMES)) for i, col in enumerate(com.TABLE_COLUMN_NAMES): self.model.setHeaderData(i, QtCore.Qt.Horizontal, col, QtCore.Qt.DisplayRole)
def __init__(self): QtCore.QSortFilterProxyModel.__init__(self) self.model = QtGui.QStandardItemModel() self.initModel() self.setSourceModel(self.model)
def __init__(self, name): self.name = name self.active = False self.searchDesc = None self.model = QtGui.QStandardItemModel() self.initModel()