In python, which I know is 100% runtime, I can initialize a dictionary as:

Qt Code:
  1. d={'a':1, 'b':2}
To copy to clipboard, switch view to plain text mode 

so

d['a']=1
I have a need to have a constant QMap, and I'd rather not have to call a function to initialize it, since that will break the const protection. I'd like the compiler to make it for me.

Is there any way to do that qith a QMap? (Or other similar class)