qt - Accessing the value in Qmap with the help of its key -


i have qmap , have defined qmap<qstring,modelvariables>modelmap modelvariables structure parameters valueref,value , id. want access parameter value defined in structure. wrote following code shows error.

float hxt_val_ft04 = modelmap.value("hxt_v_ft04"); 

error: expected primary expression before '.' token.

mvariables["hxt_v_ft04"] return modelvariables object if there key matching "hxt_v_ft04". otherwise default construct object , return it. can use

mvariables["hxt_v_ft04"].value 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -