def __init__(self, name, btnCopy=None, btnRemove=None, btnCompare=None, parent=None): QTreeView.__init__(self, parent) self.name = name self.setObjectName('RuleTreeView') self.btnCopy = btnCopy self.btnRemove = btnRemove self.btnCompare = btnCompare for button in [self.btnCopy, self.btnRemove, self.btnCompare]: if button: button.setEnabled(False) self.header().setObjectName('RuleTreeViewHeader') self.setSelectionMode(QAbstractItemView.SingleSelection) self.ruleModel = None self.ruleModelTest = None self.rulesets = [] # nasty: this generates self.ruleModel self.differs = []
def __init__(self, parent=None): QTreeView.__init__(self, parent) self.setItemDelegate(ScoreItemDelegate(self))
def sizeHint(self): """we never want a horizontal scrollbar for player names, we always want to see them in full""" return QSize(self.__col0Width(), QTreeView.sizeHint(self).height())