Top "Qmap" questions

QMap is a Qt container class that implements a map a.k.a. a skip-list-based dictionary.

Iterating over a QMap with for

I've a QMap object and I am trying to write its content to a file. QMap<QString, QString> …

c++ qt c++11 qmap
How to find specific value in Qmap

I need to know in QMap second value there is. Functions like first() and last() are useless. Do i have …

c++ qt qmap
QMap::contains() VS QMap::find()

I often see code like: if(myQMap.contains("my key")){ myValue = myQMap["my key"]; } which theoretically performs two look-up's in …

c++ qt qmap
Deleting all values from a QMap

I have a QMap consist of pointers to class objects, allocated using new. I need to delete all these pointers. …

c++ qt pointers qmap
Assigning to nested QVariantMap

#include <QtCore/QCoreApplication> #include <QVariant> #include <QtDebug> int main(int argc, char *argv[]) { QCoreApplication …

c++ qt qvariant qmap
How do I convert QMap<QString, QMap<QString, int> > to a QVariant?

QVariant (needed for QSettings class) supports creation from QMap<QString, QVariant> But trying to initialise something like this: …

c++ qt4 nested qvariant qmap
Order of items in QMap and QMultiMap

I would like to use QMultiMap (which is derived from QMap) to store key/value pairs. Since I can have …

qt qmap qmultimap
Convert QMap to JSON

I have a QMap object and I would like to convert it to JSON. I am confused how I would …

c++ json qt qmap