I have a QMAP data structure. Now, I want to insert the QVariant type in the QMAP. The data is inserted based on the priority. For example priority 1, 2.. etc. These priority is the key in the QMAP. However, I can have the same key values - meaning same priority. This means priority 1, and 1 can have different QVariants. In order to suffice this, I am using insertMulti rather than insert. Now, the difficulty is that the last insertMulti having the same key is getting inserted on the top of the previously insert value. Now, how can I make it reverse?
QMAP<int, QVariant> grp;
grp.insertMulti(0, "HELLO");
grp.insetMulti(0. "Hi");
On reading the values -
It first returs Hi. However, I want it to return HeLLO. How can I do so? Please don't give answers in using other data structures. This is a snippet of a very complex problem.