def updateViewValue(self, value): for n in range(0, self.combobox.count()): if utils.fromQVariant(self.combobox.itemData(n)) == value: self.combobox.setCurrentIndex(n) return raise AssertionError("The value %s was not in the list of options" % value)
def updateModel(self, n): self.updateModelValue(utils.fromQVariant(self.combobox.itemData(n)))