Use case-insensitive comparison in Qt wxComboBox and wxChoice

Define LexicalSortProxyModel to use the same sort order in wxQt as in
the other ports.
This commit is contained in:
Richard Smith
2019-01-16 11:03:52 +00:00
committed by Vadim Zeitlin
parent 000f8ef422
commit b27971c501
3 changed files with 45 additions and 0 deletions

View File

@@ -128,6 +128,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& name )
{
m_qtComboBox = new wxQtComboBox( parent, this );
InitialiseSort(m_qtComboBox);
while ( n-- > 0 )
m_qtComboBox->addItem( wxQtConvertString( *choices++ ));
m_qtComboBox->setEditText( wxQtConvertString( value ));
@@ -140,7 +142,10 @@ void wxComboBox::SetValue(const wxString& value)
if ( HasFlag(wxCB_READONLY) )
SetStringSelection(value);
else
{
wxTextEntry::SetValue(value);
m_qtComboBox->setEditText( wxQtConvertString(value) );
}
}
wxString wxComboBox::DoGetValue() const