一对多的查询排序ui

xiaoxiao2021-02-28  141

对QMultiMap qSort 使用

 在qt help 中 QMultiMap 的说明文档中例子

QMultiMap<QString, int> map1, map2, map3;

map1.insert("plenty", 100); map1.insert("plenty", 2000); // map1.size() == 2 QList<int> values = map.values("plenty"); for (int i = 0; i < values.size(); ++i) cout << values.at(i) << endl;

qSort help 中的例子,

QList<int> list;

list << 33 << 12 << 68 << 6 << 12; qSort(list.begin(), list.end()); // list: [ 6, 12, 12, 33, 68 ] 组合起来就可以完成一对多的查询,排序
转载请注明原文地址: https://www.6miu.com/read-64791.html

最新回复(0)