Usernаme
24th May 2010, 15:38
For example I want that after map.remove element with index 2 replace your index to 1..
#include <QApplication>
#include <QMap>
#include <QDebug>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QMap<int, QString> map;
map.insert(1, "some1");
map.insert(2, "some2");
map.insert(3, "some3");
map.remove(1);
qDebug() << map.value(1);
return app.exec();
};
#include <QApplication>
#include <QMap>
#include <QDebug>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QMap<int, QString> map;
map.insert(1, "some1");
map.insert(2, "some2");
map.insert(3, "some3");
map.remove(1);
qDebug() << map.value(1);
return app.exec();
};