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