def __init__(self, *args): QComboBox.__init__(self, *args) self.paletteImg = [] self.cachedPalettes = [] ## self.setItemDelegate(PaletteItemDelegate(self, self)) size = self.sizeHint() size = QSize(size.width() * 2 / 3, size.height() * 2 / 3) self.setIconSize(size)
def __init__(self, tree, dataset, master, parent=None): QComboBox.__init__(self, parent) Control.__init__(self, tree, dataset, master) self.setSelectionMode(QListView.ExtendedSelection) model = QStringListModel(self) self.setModel(model) self.setOptions(tree.subelements_top("Option"))
def __init__(self, tree, dataset, master, parent=None): QComboBox.__init__(self, parent) Control.__init__(self, tree, dataset, master) self.options = [] self.selectedIndex = 0 if getattr(tree, "graph", "0") == "1": self.setOptions(tree.subelements("Option")) else: self.setOptions(tree.subelements_top("Option")) self.currentIndexChanged[int].connect(self.onIndexChange)