QMap key (QString) with Space
-
wrote on 21 Jun 2016, 07:17 last edited by inforathinam
I have created a QMap as follows:
QMap<QString,QString> mymap;When i insert "[TP_1::a_33 aa ff]" as key, it is taking only "TP_1::a_33" as key.
Can someone tell me space is not allowed in the key? -
I have created a QMap as follows:
QMap<QString,QString> mymap;When i insert "[TP_1::a_33 aa ff]" as key, it is taking only "TP_1::a_33" as key.
Can someone tell me space is not allowed in the key?@inforathinam
Please show some code, especially how you create and insert the key. -
@inforathinam
Please show some code, especially how you create and insert the key.wrote on 21 Jun 2016, 07:56 last edited by@raven-worx
QString testname = "[TP_1::a_33 aa ff]";
mymap.insert(testname,"E2_0600_X.sum"); -
@raven-worx
QString testname = "[TP_1::a_33 aa ff]";
mymap.insert(testname,"E2_0600_X.sum");@inforathinam
this code works, at least in Qt 5.6.Maybe your source file itself has some strange encoding?
Did you compile Qt yourself?
How does the string look like before inserting it into the hash? -
@raven-worx
QString testname = "[TP_1::a_33 aa ff]";
mymap.insert(testname,"E2_0600_X.sum");@inforathinam How do you know that only the part before blank is inserted?
1/5