def set_unit_combobox(self, value): self.weight_spinbutton = convert_mass(self.weight_spinbutton, value) self.unit_combobox = value
def get_result_entry(self): if self.unit1_combobox != self.unit2_combobox: return convert_mass(self.weight_spinbutton, self.unit2_combobox) else: return self.weight_spinbutton