Qt containers and their STL counterparts
Qt containers and their STL counterparts
http://www.cnblogs.com/findumars/p/6279908.html
The following table summarises the main sequential and associative Qt containers and their STL counterparts. For the most part, we will ignore the string classes, even though technically, they are also containers.
| Qt | STL | 
|---|---|
| Sequential Containers | |
| QVector | std::vector | 
| — | std::deque | 
| QList | — | 
| QLinkedList | std::list | 
| — | std::forward_list | 
| Associative Containers | |
| QMap | std::map | 
| QMultiMap | std::multimap | 
| — | std::set | 
| — | std::multiset | 
| QHash | std::unordered_map | 
| QMultiHash | std::unordered_multimap | 
| QSet | std::unordered_set | 
| — | std::unordered_multiset | 
As you can see, there are no Qt containers corresponding to std::deque, std::forward_list and std::{multi,}set, and there is no STL container that is quite like QList. There are also two gotchas: QList isn’t at all like std::list, and QSet isn’t at all like std::set. For some reason, there’s also no QMultiSet.
Guideline: Remember that QList has nothing to do with std::list, and QSet has nothing to do with std::set.

 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号