I am setting a model to QComboBox
on editTextChanged
. While setting a model it again emits an editTextChanged
signal on editTextChanged. I am using an SQL like query for filtering combobox items.
pls help me
Asked
Active
Viewed 276 times
2 Answers
2
You could disconnect
the signal from the slot(s) before setting the new model, and connect it again afterwards.

agold
- 6,140
- 9
- 38
- 54
2
You can temporarily disable all signals emitted from QComboBox
using blockSignals(ture);
QComboBox* combo = /* ..... */
combo->blockSignals(true);
combo->setModel(newModel);
combo->blockSignals(false);

Lahiru Chandima
- 22,324
- 22
- 103
- 179