

def setter(self, widget, value):
    '\n        Update the currently selected item to the one which stores value in\n        its itemData\n        '
    idx = widget.findText(value)
    if (idx == (- 1)):
        if (value is not None):
            raise ValueError("Cannot find text '{0}' in combo box".format(value))
    widget.setCurrentIndex(idx)

dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/widget_properties.py CurrentComboTextProperty.setter/original