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
Post a Comment