I want to intialise a QHash as a global variable.
Because it's global I can't write something like
QHash<QString, int> MY_HASH;
MY_HASH["one"] = 1;
MY_HASH["two"] = 2;
But I'm not sure how I would assign values to MY_HASH in its intialisation.
I want to intialise a QHash as a global variable.
Because it's global I can't write something like
QHash<QString, int> MY_HASH;
MY_HASH["one"] = 1;
MY_HASH["two"] = 2;
But I'm not sure how I would assign values to MY_HASH in its intialisation.