I have QMultiMap as follows:
QMultiMap <int, QString> paramIDMap, paramValueMap;
My value is "xyz" and i want to take it's key.
Example: paramIDMap.getkey("xyz") like this
How to do this?
Expected output should return key.
I have QMultiMap as follows:
QMultiMap <int, QString> paramIDMap, paramValueMap;
My value is "xyz" and i want to take it's key.
Example: paramIDMap.getkey("xyz") like this
How to do this?
Expected output should return key.
Copyright © 2021 Jogjafile Inc.
QMultiMap is intended to store key-value pairs for fast lookup by key where a key can have multiple values. The QList QMap::keys(const T &value) const method which is inherited from QMap, will return a QList of keys for a specific value. That won't be fast lookup and the time complexity would be linear.
Which
kswill contain [1,2].