Reset combo box text when requested to select an empty item.
git-svn-id: http://voip.null.ro/svn/yate@3233 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
6c28d0f98c
commit
9d008e57d3
|
@ -1104,10 +1104,16 @@ bool QtWindow::setSelect(const String& name, const String& item)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case QtWidget::ComboBox:
|
case QtWidget::ComboBox:
|
||||||
d = w.combo()->findText(QtClient::setUtf8(item));
|
if (item) {
|
||||||
if (d < 0)
|
d = w.combo()->findText(QtClient::setUtf8(item));
|
||||||
|
if (d < 0)
|
||||||
|
return false;
|
||||||
|
w.combo()->setCurrentIndex(d);
|
||||||
|
}
|
||||||
|
else if (w.combo()->lineEdit())
|
||||||
|
w.combo()->lineEdit()->setText("");
|
||||||
|
else
|
||||||
return false;
|
return false;
|
||||||
w.combo()->setCurrentIndex(d);
|
|
||||||
return true;
|
return true;
|
||||||
case QtWidget::ListBox:
|
case QtWidget::ListBox:
|
||||||
d = findListRow(*(w.list()),item);
|
d = findListRow(*(w.list()),item);
|
||||||
|
|
Loading…
Reference in New Issue