while(query.next()) {
//value 0 corresponds to ime in SELECT statement
town = query.value(0).toString();
town_number = query.value(1).toString();
combined = town + " " + town_number;
comb.append(combined);
}
//sort the list of items in ascending order
//comb.sort();
QMap<QString,QString> comb;
kraj_combo->insertItems(0,comb);
while(query.next()) {
//value 0 corresponds to ime in SELECT statement
town = query.value(0).toString();
town_number = query.value(1).toString();
combined = town + " " + town_number;
comb.append(combined);
}
//sort the list of items in ascending order
//comb.sort();
QMap<QString,QString> comb;
kraj_combo->insertItems(0,comb);
To copy to clipboard, switch view to plain text mode
- I want to sort items apphabetically but not case sensitively. I'm not sure how to do it?
Well, if you type in the QCobmoBox a name or a number (I added in the previous post) then it throws you on that name, you don't have to search through that manually. I'm just worried that it would be too slow, would it?
Bookmarks