QMap按照key排序
时间: 2023-10-09 10:14:31 浏览: 255
QMap是Qt框架中的一个容器类,它具有自动排序的特性,可以按照键的顺序进行排序。为了让QMap按照键排序,首先要确保键类型具备operator<()运算符,因为QMap使用该运算符来进行排序。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [利用QMap的自动排序特性获取未使用的Key](https://blog.csdn.net/qq_38338428/article/details/92804037)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [对QMap中的key进行自定义排序](https://blog.csdn.net/hp_cpp/article/details/109275892)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文