Uwe Stöhr wrote: > +void LengthCombo::noMu() > +{ > + int num = QComboBox::count(); > + for (int i = 0; i < num; i++) { > + if (QComboBox::itemText(i).contains("mu")) { > + QComboBox::removeItem(i); > + --i; > + --num; > + } > + } > +} > +
Two issues: 1. the strings in the combo are translated. So searching fo the English version "mu" might fail. You will have to compare unit_name_gui against unit_name 2. Why "contains("mu")"? I think you are looking for the string "mu" exactly. Jürgen