I wanted to create multidimensional arrays in QT.
I am trying to use QVariantMap to do so :
Qt Code:
  1. QVariantMap v;
  2. v["lang"] = 1;
  3. v["test"] = 1;
To copy to clipboard, switch view to plain text mode 

The above code works, but when I try to create another level of array, it doesnt work.
Qt Code:
  1. QVariantMap v;
  2. v["test"]["test"] = 1;
To copy to clipboard, switch view to plain text mode 

How should I get this to work in QT ?
I need this functionality to insert as well as retrieve data from the Map.
I know its possible to create another QVariantMap first and then insert it into the MAP again :
Qt Code:
  1. QVariantMap v;
  2. QVariantMap test;
  3. test["a"] = 1;
  4. test["b"] = 2;
  5. v["test"] = test;
To copy to clipboard, switch view to plain text mode 

However in the above code, I am not able to modify the values of the nested map again like v["test"]["b"] = 3;

Is there anyway to achieve this ?